From 9bc2d2981b540aa291cfecde5d33615df56a078b Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 22 七月 2022 09:59:19 +0800 Subject: [PATCH] update springboot 2.7.1 => 2.7.2 update hutool 5.8.3 => 5.8.4 update okhttp 4.9.1 => 4.10.0 update lock4j 2.2.1 => 2.2.2 update aws-java-sdk-s3 1.12.248 => 1.12.264 修复依赖安全漏洞 update aliyun.sms 2.0.9 => 2.0.16 update tencent.sms 3.1.537 => 3.1.555 update guava 30.0-jre => 31.1-jre --- ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java index 540708f..5a43203 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java @@ -5,6 +5,7 @@ import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; +import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.dto.RoleDTO; import com.ruoyi.common.core.domain.entity.SysUser; @@ -130,7 +131,7 @@ * 鏍¢獙鐭俊楠岃瘉鐮� */ private boolean validateSmsCode(String phonenumber, String smsCode, HttpServletRequest request) { - String code = RedisUtils.getCacheObject(Constants.CAPTCHA_CODE_KEY + phonenumber); + String code = RedisUtils.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + phonenumber); if (StringUtils.isBlank(code)) { asyncService.recordLogininfor(phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request); throw new CaptchaExpireException(); @@ -146,7 +147,7 @@ * @param uuid 鍞竴鏍囪瘑 */ public void validateCaptcha(String username, String code, String uuid, HttpServletRequest request) { - String verifyKey = Constants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); + String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); String captcha = RedisUtils.getCacheObject(verifyKey); RedisUtils.deleteObject(verifyKey); if (captcha == null) { @@ -242,7 +243,7 @@ */ private void checkLogin(LoginType loginType, String username, Supplier<Boolean> supplier) { HttpServletRequest request = ServletUtils.getRequest(); - String errorKey = Constants.LOGIN_ERROR + username; + String errorKey = CacheConstants.LOGIN_ERROR + username; Integer errorLimitTime = Constants.LOGIN_ERROR_LIMIT_TIME; Integer setErrorNumber = Constants.LOGIN_ERROR_NUMBER; String loginFail = Constants.LOGIN_FAIL; -- Gitblit v1.9.3