From a0406cd199d4301dd82059fc0debd88cc0f45f58 Mon Sep 17 00:00:00 2001 From: kylin L <452061493@qq.com> Date: Wed, 19 Jun 2024 17:38:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=8A=A0=E4=B8=AA=E9=99=84=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/framework/shiro/service/LoginService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/shiro/service/LoginService.java b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/shiro/service/LoginService.java index c86a8ca2..a21ce538 100644 --- a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/shiro/service/LoginService.java +++ b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/shiro/service/LoginService.java @@ -41,11 +41,11 @@ public class LoginService public User login(String username, String password) { // 验证码校验 -// if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA))) -// { -// AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"))); -// throw new CaptchaException(); -// } + if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA))) + { + AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"))); + throw new CaptchaException(); + } // 用户名或密码为空 错误 if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {