Skip to content

Commit

Permalink
Install location safety should consider casing
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Oct 8, 2021
1 parent 25524eb commit 0a0ad34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubygems/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def install_location(filename, destination_dir) # :nodoc:
destination = File.expand_path(filename, destination_dir)

raise Gem::Package::PathError.new(destination, destination_dir) unless
destination.start_with? destination_dir + '/'
normalize_path(destination).start_with? normalize_path(destination_dir + '/')

begin
real_destination = File.expand_path(File.realpath(destination))
Expand Down

0 comments on commit 0a0ad34

Please sign in to comment.