make login more sturdy

This commit was merged in pull request #3.
This commit is contained in:
David Rodenkirchen
2026-05-28 13:16:00 +02:00
parent 11724ad0d9
commit 36418470a6
2 changed files with 3 additions and 3 deletions
+3
View File
@@ -32,6 +32,9 @@ class LoginPage(Component):
self.login_in_progress = True
user_name = copy(self.user_name) # Prevents race condition name swap
is_valid = await self.session[UserService].is_login_valid(user_name, self.password)
if not is_valid: # Migrated users
user_name = user_name.lower().capitalize()
is_valid = await self.session[UserService].is_login_valid(user_name, self.password)
if is_valid:
user: User = await self.session[UserService].get_user(user_name)
self.error_on_last_attempt = False