Skip to content

Commit

Permalink
Merge pull request #97 from uw-it-aca/bug/django-session-err
Browse files Browse the repository at this point in the history
b64encode the blti params before adding them to session
  • Loading branch information
jlaney authored Feb 9, 2024
2 parents 1a26647 + 4ee9e64 commit c50e37a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blti/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def filter_oauth_params(self, params):

def _encrypt_session(self, data):
aes = aes128cbc(settings.BLTI_AES_KEY, settings.BLTI_AES_IV)
return aes.encrypt(json.dumps(data))
return b64encode(aes.encrypt(json.dumps(data)))

def _decrypt_session(self, string):
aes = aes128cbc(settings.BLTI_AES_KEY, settings.BLTI_AES_IV)
return json.loads(aes.decrypt(string))
return json.loads(aes.decrypt(b64decode(string)))

0 comments on commit c50e37a

Please sign in to comment.