From ee28e423a77d78b5b05a8cac28df1105603afc18 Mon Sep 17 00:00:00 2001 From: Tomasz Date: Mon, 25 Jan 2021 21:24:59 +0100 Subject: [PATCH] Fix fixa fixa --- app/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views.py b/app/views.py index 1bbb3c1..42ea3d3 100644 --- a/app/views.py +++ b/app/views.py @@ -41,12 +41,13 @@ def login(request, *args, **kwargs): else: while True: try: + request.session[request.session.session_key] = Fernet.generate_key().decode('utf-8') rkey = Fernet(bytes(request.session[request.session.session_key], 'utf-8')) + print(bytes(request.session[request.session.session_key], 'utf-8')) break except KeyError: continue - sender_return['s'] = json.dumps(sender_return['s']) sender_return['s'] = sender_return['s'].encode() sender_return['s'] = rkey.encrypt(sender_return['s'])