Skip to content

Commit

Permalink
Merge pull request #1653 from wpscanteam/fix-ruby-3.0
Browse files Browse the repository at this point in the history
Fixes for ruby 3
  • Loading branch information
erwanlr authored Jun 8, 2021
2 parents 6060fc7 + d14bc73 commit 3c99593
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/wp_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def error_log?(path = 'error_log', params = {})
#
# @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)
Expand Down
8 changes: 4 additions & 4 deletions lib/wpscan/target/platform/wordpress/custom_directories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ def url(path = nil)
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
Expand Down
2 changes: 1 addition & 1 deletion wpscan.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 3c99593

Please sign in to comment.