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

duhanyu
Live 5 years ago committed by Gitee
parent 33f09d7747
commit 19b8688759

@ -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;
}

Loading…
Cancel
Save