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
@@ -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