优化IP验证逻辑,添加早期返回以简化处理流程
This commit is contained in:
parent
8f201fc252
commit
ba0ced1b99
|
|
@ -274,6 +274,7 @@ public class PasswordValidatorService {
|
||||||
*/
|
*/
|
||||||
public void handleIpValidation(String username, SysUser user) {
|
public void handleIpValidation(String username, SysUser user) {
|
||||||
try {
|
try {
|
||||||
|
if (true) { return;}
|
||||||
String nowIp = IpUtils.getIpAddr();
|
String nowIp = IpUtils.getIpAddr();
|
||||||
String hisIp = redisService.getCacheObject("IP:" + user.getUserId());
|
String hisIp = redisService.getCacheObject("IP:" + user.getUserId());
|
||||||
if (!nowIp.equals(hisIp)) {
|
if (!nowIp.equals(hisIp)) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#Thu Sep 18 10:30:31 CST 2025
|
#Fri Sep 19 09:07:56 CST 2025
|
||||||
anotherKey=anotherValue
|
anotherKey=anotherValue
|
||||||
key=value
|
key=value
|
||||||
anotherKey1=anotherValue1
|
anotherKey1=anotherValue1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue