From 03aef64693417f2d87b429e112a1d999980751f2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 10 Jun 2020 22:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E5=B0=91EscapeUtil=E5=8C=85=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java index 5aa15dfe..617c8cc7 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java @@ -4,6 +4,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; import javax.servlet.http.HttpServletRequest; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.html.EscapeUtil; /** * 获取IP方法 @@ -40,7 +41,7 @@ public class IpUtils { ip = request.getRemoteAddr(); } - ip = EscapeUtil.clean(ip);//清除Xss特殊字符 + ip = EscapeUtil.clean(ip);// 清除Xss特殊字符 return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; }