Skip to content

Commit

Permalink
Fix bug in AWS Signature calculation
Browse files Browse the repository at this point in the history
The query string needs to be quoted slightly differently.
  • Loading branch information
Nikratio committed Sep 9, 2018
1 parent 8968440 commit 7585e98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/s3ql/backends/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,12 @@ def _authorize_request(self, method, path, headers, subres, query_string):
auth_strs.append(urllib.parse.quote(path))

if query_string:
s = urllib.parse.urlencode(query_string, doseq=True).split('&')
s = urllib.parse.urlencode(query_string, doseq=True,
quote_via=urllib.parse.quote).split('&')
else:
s = []
if subres:
s.append(urllib.parse.quote_plus(subres) + '=')
s.append(urllib.parse.quote(subres) + '=')
if s:
s = '&'.join(sorted(s))
else:
Expand Down

0 comments on commit 7585e98

Please sign in to comment.