fix: [#17313] Case insensitive email login

pull/18826/head
Wind Hong 1 year ago committed by crazywoola
parent 65e9f6651c
commit ab02e96a2a

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

Loading…
Cancel
Save