diff options
| author | Michael Merickel <michael@merickel.org> | 2014-02-21 22:23:29 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2014-02-21 22:25:36 -0600 |
| commit | 04c1b6601ca48e105dc8cdafd33b7958e17dd017 (patch) | |
| tree | 65bd8944c32beb6d74ed28221f7f91c21d1d5489 /tests | |
| parent | e2e72c48ee81e0f35f17e0120b2bf5a3de60b35d (diff) | |
| download | webob-fix.136.tar.gz | |
fix #136, allow high order chars in SignedSerializer secret/saltfix.136
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_cookies.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_cookies.py b/tests/test_cookies.py index aa54ed6..c956477 100644 --- a/tests/test_cookies.py +++ b/tests/test_cookies.py @@ -591,7 +591,7 @@ def serialize(secret, salt, data): import json from hashlib import sha1 from webob.compat import bytes_ - salted_secret = bytes_(salt or '') + bytes_(secret) + salted_secret = bytes_(salt or '', 'utf-8') + bytes_(secret, 'utf-8') cstruct = bytes_(json.dumps(data)) sig = hmac.new(salted_secret, cstruct, sha1).digest() return base64.urlsafe_b64encode(sig + cstruct).rstrip(b'=') |
