Commit 19b86887 authored by Live's avatar Live Committed by Gitee

IpUtils工具,清除Xss特殊字符,防止Xff注入攻击

parent 33f09d77
...@@ -40,7 +40,7 @@ public class IpUtils ...@@ -40,7 +40,7 @@ public class IpUtils
{ {
ip = request.getRemoteAddr(); ip = request.getRemoteAddr();
} }
ip = EscapeUtil.clean(ip);//清除Xss特殊字符
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
} }
......
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