This commit is contained in:
hjlarry 2025-12-22 14:15:31 +08:00
parent 61f962b728
commit 0bfb4a87af
1 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,9 @@ class EmailCodeLoginApi(Resource):
raise InvalidTokenError()
token_email = token_data.get("email")
normalized_token_email = token_email.lower() if isinstance(token_email, str) else token_email
if not isinstance(token_email, str):
raise InvalidEmailError()
normalized_token_email = token_email.lower()
if normalized_token_email != user_email:
raise InvalidEmailError()