Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed unescaping of path_to_sign in generate_url

Escaping the path to sign gives the wrong signature when the key
contains charaters that would be encoded when signed.
  • Loading branch information...
commit 2581b1be781ae189c0e846290ee6e1297d8e63df 1 parent bdcd8e3
Benjamin Rhodes authored konstantin-dzreev committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/s3/right_s3_interface.rb
View
2  lib/s3/right_s3_interface.rb
@@ -856,7 +856,7 @@ def get_object(bucket, key, headers={})
def generate_link(method, headers={}, expires=nil) #:nodoc:
# calculate request data
server, path, path_to_sign = fetch_request_params(headers)
- path_to_sign = CGI.unescape(path_to_sign)
+
# expiration time
expires ||= DEFAULT_EXPIRES_AFTER
expires = Time.now.utc + expires if expires.is_a?(Fixnum) && (expires < ONE_YEAR_IN_SECONDS)
Please sign in to comment.
Something went wrong with that request. Please try again.