From 19b868875992821a28f408cbbd2a31fa47f91072 Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Tue, 9 Jun 2020 11:36:10 +0800 Subject: [PATCH] =?UTF-8?q?IpUtils=E5=B7=A5=E5=85=B7=EF=BC=8C=E6=B8=85?= =?UTF-8?q?=E9=99=A4Xss=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2Xff=E6=B3=A8=E5=85=A5=E6=94=BB=E5=87=BB?= 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 | 2 +- 1 file changed, 1 insertion(+), 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 9e050e9f..5aa15dfe 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 @@ -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; }