Fixes for ruby 3

This commit is contained in:
erwanlr
2021-06-08 16:16:10 +02:00
parent 6060fc7a69
commit d14bc739c8
3 changed files with 6 additions and 6 deletions

View File

@@ -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