From ff878564e4b38ffc0299c6733736eb34d3b77abe Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 30 Jun 2019 19:47:32 +0800 Subject: [PATCH] =?UTF-8?q?addr=E9=98=B2=E6=AD=A2=E7=A9=BA=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/templates/main_v1.html | 1 - .../src/main/java/com/ruoyi/common/utils/IpUtils.java | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/templates/main_v1.html b/ruoyi-admin/src/main/resources/templates/main_v1.html index 582453dba..f0e434bc1 100644 --- a/ruoyi-admin/src/main/resources/templates/main_v1.html +++ b/ruoyi-admin/src/main/resources/templates/main_v1.html @@ -12,7 +12,6 @@ -
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java index b9cfa028f..a2a7011b0 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java @@ -51,6 +51,10 @@ public class IpUtils private static boolean internalIp(byte[] addr) { + if (StringUtils.isNull(addr) || addr.length < 2) + { + return true; + } final byte b0 = addr[0]; final byte b1 = addr[1]; // 10.x.x.x/8