feature/pre-release-fixes #3

Merged
Typhus merged 3 commits from feature/pre-release-fixes into main 2026-05-28 11:16:26 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 36418470a6 - Show all commits
+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
-3
View File
@@ -1,4 +1,3 @@
from asyncio import sleep
from hashlib import sha256
from typing import Optional
from string import ascii_letters, digits
@@ -69,8 +68,6 @@ class UserService:
async def is_login_valid(self, user_name: str, password_clear_text: str) -> bool:
user = await self.get_user(user_name)
if not user:
user = await self.get_user(user_name.lower()) # Migrated users had all lowercase names
user_password_hash = sha256(password_clear_text.encode(encoding="utf-8")).hexdigest()
if not user:
return False