mirror of https://github.com/jumpserver/jumpserver
fix: sms bug
parent
b95d3ac9be
commit
9424929dde
|
@ -401,9 +401,9 @@ class AuthMixin(PasswordEncryptionViewMixin):
|
||||||
def check_user_mfa(self, code, mfa_type=MFAType.OTP, user=None):
|
def check_user_mfa(self, code, mfa_type=MFAType.OTP, user=None):
|
||||||
user = user if user else self.get_user_from_session()
|
user = user if user else self.get_user_from_session()
|
||||||
if not user.mfa_enabled:
|
if not user.mfa_enabled:
|
||||||
return True
|
return
|
||||||
|
|
||||||
if not (bool(user.otp_secret_key) and mfa_type == MFAType.OTP):
|
if not bool(user.otp_secret_key) and mfa_type == MFAType.OTP:
|
||||||
self.set_passwd_verify_on_session(user)
|
self.set_passwd_verify_on_session(user)
|
||||||
raise errors.OTPRequiredError(reverse_lazy('authentication:user-otp-enable-bind'))
|
raise errors.OTPRequiredError(reverse_lazy('authentication:user-otp-enable-bind'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue