Skip to content

Commit

Permalink
make sure we always deal with integer character values when sanitizing
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Aug 7, 2011
1 parent 534ce77 commit b072c03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/aws/s3/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def prepare_path(path)
path = path.remove_extended unless path.valid_utf8?

# Escape square brackets and single quotes
URI.escape(path).gsub(/[\[\]']/) { |m| "%%%02x" % m[0] }
URI.escape(path).gsub(/[\[\]']/) { |m| "%%%02x" % m[0].ord }
end
end

Expand Down Expand Up @@ -277,4 +277,4 @@ def validate(options)
end
end
end
end
end

0 comments on commit b072c03

Please sign in to comment.