From 98aa54038f1d135036400ee038fd1cc95594bb0a Mon Sep 17 00:00:00 2001 From: Joe <1264204425@qq.com> Date: Mon, 30 Sep 2024 10:57:35 +0800 Subject: [PATCH] fix: login password judgement --- 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 3b49cf1216..ae540ad9ca 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -103,7 +103,7 @@ class AccountService: if account.status in {AccountStatus.BANNED.value, AccountStatus.CLOSED.value}: raise AccountLoginError("Account is banned or closed.") - if password and invite_token: + if password and invite_token and account.password is None: # if invite_token is valid, set password and password_salt salt = secrets.token_bytes(16) base64_salt = base64.b64encode(salt).decode()