优化IP验证逻辑,添加早期返回以简化处理流程

This commit is contained in:
syruan 2025-09-19 09:27:04 +08:00
parent 8f201fc252
commit ba0ced1b99
2 changed files with 2 additions and 1 deletions

View File

@ -274,6 +274,7 @@ public class PasswordValidatorService {
*/
public void handleIpValidation(String username, SysUser user) {
try {
if (true) { return;}
String nowIp = IpUtils.getIpAddr();
String hisIp = redisService.getCacheObject("IP:" + user.getUserId());
if (!nowIp.equals(hisIp)) {

View File

@ -1,4 +1,4 @@
#Thu Sep 18 10:30:31 CST 2025
#Fri Sep 19 09:07:56 CST 2025
anotherKey=anotherValue
key=value
anotherKey1=anotherValue1