From ab02e96a2a5f006bf956e05742885dcb94c6279b Mon Sep 17 00:00:00 2001 From: Wind Hong Date: Sat, 26 Apr 2025 09:10:57 +0000 Subject: [PATCH] fix: [#17313] Case insensitive email login --- api/services/account_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services/account_service.py b/api/services/account_service.py index d21926d746..935ecbfa8c 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -149,7 +149,7 @@ class AccountService: def authenticate(email: str, password: str, invite_token: Optional[str] = None) -> Account: """authenticate account with email and password""" - account = db.session.query(Account).filter_by(email=email).first() + account = db.session.query(Account).filter(func.lower(Account.email) == email.lower()).first() if not account: raise AccountNotFoundError()