From 66a9c046b4090fd9cc8db3dd923d6cb199925239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Wed, 21 Feb 2024 15:02:59 +0100 Subject: [PATCH] fix: strip user_id --- app/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api.py b/app/api.py index db72c753..3de03afa 100644 --- a/app/api.py +++ b/app/api.py @@ -213,7 +213,7 @@ def authentication( # form_data.username can be the user_id or the email, so we need to # fetch the user_id from the response # We also need to lowercase the user_id as it's case-insensitive - user_id = r.json()["user_id"].lower() + user_id = r.json()["user_id"].lower().strip() token = create_token(user_id) session, *_ = crud.create_session(db, user_id=user_id, token=token) session = crud.update_session_last_used_field(db, session=session)