Compare commits

..

No commits in common. "21cce3d38ebcf395c735468a0032562ad755260d" and "b5d7eca97c34105956df7edab84b62c7e8ef75e3" have entirely different histories.

View File

@ -59,12 +59,11 @@ 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 and user.user_fallback_password == user_password_hash:
return True
return user.user_password == user_password_hash
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()
def _check_for_disallowed_char(self, name: str) -> Optional[str]: