mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
fix: login password judgement
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user