From 7d56678a8e830a6add5b250ea2163a089fca0210 Mon Sep 17 00:00:00 2001 From: xinwen Date: Mon, 25 Oct 2021 11:32:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E5=87=BA=E7=8E=B0=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/errors.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/authentication/errors.py b/apps/authentication/errors.py index 79adb4904..a1c7dd427 100644 --- a/apps/authentication/errors.py +++ b/apps/authentication/errors.py @@ -134,6 +134,10 @@ class CredentialError(AuthFailedNeedLogMixin, AuthFailedNeedBlockMixin, AuthFail times_remainder = util.get_remainder_times() block_time = settings.SECURITY_LOGIN_LIMIT_TIME + if times_remainder < 1: + self.msg = block_login_msg.format(settings.SECURITY_LOGIN_LIMIT_TIME) + return + default_msg = invalid_login_msg.format( times_try=times_remainder, block_time=block_time )