From de6ed03ad8864c8a9f4b1ccc8d24515931414e7f Mon Sep 17 00:00:00 2001 From: tuxcoder Date: Sun, 18 Feb 2024 20:17:08 +0100 Subject: [PATCH] force lower case login name --- lenticular_cloud/views/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenticular_cloud/views/auth.py b/lenticular_cloud/views/auth.py index 4de24a4..160aadd 100644 --- a/lenticular_cloud/views/auth.py +++ b/lenticular_cloud/views/auth.py @@ -134,7 +134,7 @@ async def login() -> ResponseReturnValue: return redirect(resp.redirect_to) form = LoginForm() if form.validate_on_submit(): - user = User.query.filter_by(username=form.data['name']).first() # type: Optional[User] + user = User.query.filter_by(username=form.data['name'].lower()).first() # type: Optional[User] if user: session['username'] = str(user.username) else: