Merge pull request #22 from wulkanowy/feature/account_manager

Fix fixa fixa
This commit is contained in:
Pengwius 2021-01-25 21:26:11 +01:00 committed by GitHub
commit f05fea031b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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