Fix fixa fixa

This commit is contained in:
Tomasz 2021-01-25 21:24:59 +01:00
parent 1b72512026
commit ee28e423a7

View file

@ -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'])