From 83bc2b7b5ed832a62f74494b317b57db2874bfb0 Mon Sep 17 00:00:00 2001 From: Jim Laney Date: Fri, 9 Feb 2024 11:58:45 -0800 Subject: [PATCH] decode encrypted str before adding to session --- blti/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blti/__init__.py b/blti/__init__.py index bcd12a1..6092a53 100644 --- a/blti/__init__.py +++ b/blti/__init__.py @@ -44,7 +44,7 @@ def filter_oauth_params(self, params): def _encrypt_session(self, data): aes = aes128cbc(settings.BLTI_AES_KEY, settings.BLTI_AES_IV) - return b64encode(aes.encrypt(json.dumps(data))) + return b64encode(aes.encrypt(json.dumps(data))).decode('utf8') def _decrypt_session(self, string): aes = aes128cbc(settings.BLTI_AES_KEY, settings.BLTI_AES_IV)