记得上下班打卡 | git大法好,push需谨慎

Commit a3eb4f5e authored by 张国柄's avatar 张国柄

~api:NFT安全密码校验顺序调整;

parent c1ed2db2
...@@ -2752,15 +2752,15 @@ public class GoblinRedisUtils { ...@@ -2752,15 +2752,15 @@ public class GoblinRedisUtils {
* @return ResponseDto<String> * @return ResponseDto<String>
*/ */
public ResponseDto<String> validUserSafePasswd(String inputPasswd, GoblinUserSafeConfigDto userSafeConfigDto, String uid) { public ResponseDto<String> validUserSafePasswd(String inputPasswd, GoblinUserSafeConfigDto userSafeConfigDto, String uid) {
if (userSafeConfigDto.getPasswd().equals(DigestUtils.md5DigestAsHex(inputPasswd.concat(passwdSalt).getBytes(StandardCharsets.UTF_8)))) {
return ResponseDto.success();
}
long expire = redisUtil.getExpire(GoblinRedisConst.USER_SAFE_LK_PASSWDTL.concat(uid)); long expire = redisUtil.getExpire(GoblinRedisConst.USER_SAFE_LK_PASSWDTL.concat(uid));
ErrorMapping.ErrorMessage errorMessage; ErrorMapping.ErrorMessage errorMessage;
if (expire > 0) { if (expire > 0) {
errorMessage = ErrorMapping.get("140113"); errorMessage = ErrorMapping.get("140113");
return ResponseDto.failure(errorMessage.getCode(), String.format(errorMessage.getMessage(), expire / 60 + 1)); return ResponseDto.failure(errorMessage.getCode(), String.format(errorMessage.getMessage(), expire / 60 + 1));
} }
if (userSafeConfigDto.getPasswd().equals(DigestUtils.md5DigestAsHex(inputPasswd.concat(passwdSalt).getBytes(StandardCharsets.UTF_8)))) {
return ResponseDto.success();
}
LocalDateTime currentDateTime, tomorrowStartDateTime; LocalDateTime currentDateTime, tomorrowStartDateTime;
long validFailedNum = redisUtil.incr(GoblinRedisConst.USER_SAFE_LK_PASSWD.concat(uid), 1); long validFailedNum = redisUtil.incr(GoblinRedisConst.USER_SAFE_LK_PASSWD.concat(uid), 1);
Integer passwdtlTimelimit; Integer passwdtlTimelimit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment