mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 00:15:06 +08:00
IpUtils工具,清除Xss特殊字符,防止Xff注入攻击
This commit is contained in:
@ -40,7 +40,7 @@ public class IpUtils
|
||||
{
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
|
||||
ip = EscapeUtil.clean(ip);//清除Xss特殊字符
|
||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user