diff options
author | Daniel Lindsley <daniel@toastdriven.com> | 2014-01-06 13:01:54 -0800 |
---|---|---|
committer | Daniel Lindsley <daniel@toastdriven.com> | 2014-01-06 13:44:22 -0800 |
commit | 8b37180e69a4225d83d89bbb915c570e12b590f1 (patch) | |
tree | a2692049152c5d966435e05f9f2eec38776e67f3 /boto/auth.py | |
parent | 06a3daea5e1c6e19ac43a09593ff2a7885dd8478 (diff) | |
download | boto-8b37180e69a4225d83d89bbb915c570e12b590f1.tar.gz |
Fixed a quoting bug of special characters in S3.
Diffstat (limited to 'boto/auth.py')
-rw-r--r-- | boto/auth.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/boto/auth.py b/boto/auth.py index 0f8b10ce..ba4f9508 100644 --- a/boto/auth.py +++ b/boto/auth.py @@ -534,7 +534,10 @@ class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler): # S3 does **NOT** do path normalization that SigV4 typically does. # Urlencode the path, **NOT** ``auth_path`` (because vhosting). path = urlparse.urlparse(http_request.path) - encoded = urllib.quote(path.path) + # Because some quoting may have already been applied, let's back it out. + unquoted = urllib.unquote(path.path) + # Requote, this time addressing all characters. + encoded = urllib.quote(unquoted) return encoded def host_header(self, host, http_request): |