Fixes for ruby 3
This commit is contained in:
@@ -162,7 +162,7 @@ module WPScan
|
||||
#
|
||||
# @return [ Typhoeus::Response ]
|
||||
def head_and_get(path, codes = [200], params = {})
|
||||
final_path = +@path_from_blog
|
||||
final_path = @path_from_blog.dup # @path_from_blog is set in the plugin/theme
|
||||
final_path << path unless path.nil?
|
||||
|
||||
blog.head_and_get(final_path, codes, params)
|
||||
|
||||
@@ -125,14 +125,14 @@ module WPScan
|
||||
return @uri.to_s unless path
|
||||
|
||||
if %r{wp-content/plugins}i.match?(path)
|
||||
path = +path.gsub('wp-content/plugins', plugins_dir)
|
||||
new_path = path.gsub('wp-content/plugins', plugins_dir)
|
||||
elsif /wp-content/i.match?(path)
|
||||
path = +path.gsub('wp-content', content_dir)
|
||||
new_path = path.gsub('wp-content', content_dir)
|
||||
elsif path[0] != '/' && sub_dir
|
||||
path = "#{sub_dir}/#{path}"
|
||||
new_path = "#{sub_dir}/#{path}"
|
||||
end
|
||||
|
||||
super(path)
|
||||
super(new_path || path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
||||
s.executables = ['wpscan']
|
||||
s.require_paths = ['lib']
|
||||
|
||||
s.add_dependency 'cms_scanner', '~> 0.13.4'
|
||||
s.add_dependency 'cms_scanner', '~> 0.13.5'
|
||||
|
||||
s.add_development_dependency 'bundler', '>= 1.6'
|
||||
s.add_development_dependency 'memory_profiler', '~> 1.0.0'
|
||||
|
||||
Reference in New Issue
Block a user