Skip to content

Commit

Permalink
Bugfix:登录页面只输入用户,点击登录后跳转到异常页面 #1105 (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joee0322 authored Nov 2, 2023
1 parent 8a1b567 commit 9c0f7b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions paas2/login/bkauth/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ def clean(self):
username = self.cleaned_data.get("username")
password = self.cleaned_data.get("password")

if settings.ENABLE_PASSWORD_RSA_ENCRYPTED:
password = rsa_decrypt_password(password, settings.PASSWORD_RSA_PRIVATE_KEY)

if username and password:
if settings.ENABLE_PASSWORD_RSA_ENCRYPTED:
password = rsa_decrypt_password(password, settings.PASSWORD_RSA_PRIVATE_KEY)
self.user_cache = authenticate(
username=username,
password=password,
Expand Down

0 comments on commit 9c0f7b4

Please sign in to comment.