summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCat Lee Ball 🎷🐛 <cball@google.com>2019-03-28 16:32:57 -0700
committerCat Lee Ball 🎷🐛 <cball@google.com>2019-03-28 16:32:57 -0700
commit98f6bcd1cdac5275dc959d128f1ad530c05f19b9 (patch)
tree3ad568dfce7b85989e792cf8549550503dbbb3e4
parent53b8a153008bbaedb8dd671ae56f04b156c838e9 (diff)
downloadboto-98f6bcd1cdac5275dc959d128f1ad530c05f19b9.tar.gz
Encode values to be hashed as utf-8
-rw-r--r--boto/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/boto/auth.py b/boto/auth.py
index 83b223d1..79b1eb3d 100644
--- a/boto/auth.py
+++ b/boto/auth.py
@@ -925,7 +925,7 @@ class QuerySignatureV1AuthHandler(QuerySignatureHelper, AuthHandler):
pairs = []
for key in keys:
hmac.update(key.encode('utf-8'))
- val = get_utf8able_str(params[key])
+ val = get_utf8able_str(params[key]).encode('utf-8')
hmac.update(val)
pairs.append(key + '=' + urllib.parse.quote(val))
qs = '&'.join(pairs)
@@ -949,7 +949,7 @@ class QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler):
keys = sorted(params.keys())
pairs = []
for key in keys:
- val = get_utf8able_str(params[key])
+ val = get_utf8able_str(params[key]).encode('utf-8')
pairs.append(urllib.parse.quote(key, safe='') + '=' +
urllib.parse.quote(val, safe='-_~'))
qs = '&'.join(pairs)