Compare commits

..

2 Commits

Author SHA1 Message Date
tcprod
21cce3d38e fix reset password 2026-02-10 22:28:17 +01:00
tcprod
442d3f3e0a fix reset password 2026-02-10 22:27:32 +01:00

View File

@ -59,11 +59,12 @@ class UserService:
async def is_login_valid(self, user_name_or_mail: str, password_clear_text: str) -> bool:
user = await self.get_user(user_name_or_mail)
user_password_hash = sha256(password_clear_text.encode(encoding="utf-8")).hexdigest()
if not user:
return False
if user.user_fallback_password:
user.user_fallback_password == sha256(password_clear_text.encode(encoding="utf-8")).hexdigest()
return user.user_password == sha256(password_clear_text.encode(encoding="utf-8")).hexdigest()
if user.user_fallback_password and user.user_fallback_password == user_password_hash:
return True
return user.user_password == user_password_hash
def _check_for_disallowed_char(self, name: str) -> Optional[str]: