fix sessions in cookies for python3

This commit is contained in:
Radu Ioan Fericean
2018-04-14 11:42:31 +03:00
parent 8d4dc1b373
commit 90288a0134
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -207,6 +207,8 @@ def secure_dumps(data, encryption_key, hash_key=None, compression_level=None):
def secure_loads(data, encryption_key, hash_key=None, compression_level=None):
if not isinstance(data, bytes):
data = bytes(data, 'utf8')
components = data.count(b':')
if components == 1:
return secure_loads_deprecated(data, encryption_key, hash_key, compression_level)