mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-12 21:39:18 +00:00
fix(auth): 修复用户登录失败次数出现0次
This commit is contained in:
@@ -87,6 +87,7 @@ class UserLoginView(mixins.AuthMixin, FormView):
|
||||
try:
|
||||
self.check_user_auth(decrypt_passwd=True)
|
||||
except errors.AuthFailedError as e:
|
||||
e = self.check_is_block(raise_exception=False) or e
|
||||
form.add_error(None, e.msg)
|
||||
ip = self.get_request_ip()
|
||||
cache.set(self.key_prefix_captcha.format(ip), 1, 3600)
|
||||
|
Reference in New Issue
Block a user