Explorar el Código

update 优化 验证码校验逻辑

疯狂的狮子Li hace 11 meses
padre
commit
643fead8f4

+ 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();
         }