# Migrations

* adds missing migrations
* renames variables shadowing in-builts
This commit is contained in:
2024-08-26 18:51:58 +02:00
parent 5039da28aa
commit 33774ce557
4 changed files with 50 additions and 6 deletions

View File

@@ -35,9 +35,9 @@ class PropagateUserView(View):
def post(self, request: HttpRequest, *args, **kwargs):
# Decrypt
encrypted_body = request.body
hash = hashlib.md5()
hash.update(OAUTH_CLIENT_ID.encode("utf-8"))
key = base64.urlsafe_b64encode(hash.hexdigest().encode("utf-8"))
_hash = hashlib.md5()
_hash.update(OAUTH_CLIENT_ID.encode("utf-8"))
key = base64.urlsafe_b64encode(_hash.hexdigest().encode("utf-8"))
fernet = Fernet(key)
body = fernet.decrypt(encrypted_body).decode("utf-8")
body = json.loads(body)