فهرست منبع

update 优化 验证码校验逻辑

疯狂的狮子Li 11 ماه پیش
والد
کامیت
643fead8f4
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      ruoyi-auth/src/main/java/org/dromara/auth/service/impl/PasswordAuthStrategy.java

+ 1 - 1
ruoyi-auth/src/main/java/org/dromara/auth/service/impl/PasswordAuthStrategy.java

@@ -98,7 +98,7 @@ public class PasswordAuthStrategy implements IAuthStrategy {
             loginService.recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
             throw new CaptchaExpireException();
         }
-        if (!code.equalsIgnoreCase(captcha)) {
+        if (!StringUtils.equalsIgnoreCase(code, captcha)) {
             loginService.recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"));
             throw new CaptchaException();
         }