From de2ac66f0b6c696213c67235af4a6f3cf51bfc36 Mon Sep 17 00:00:00 2001 From: liguonan <lign@zhiding.com.cn> Date: 星期一, 03 八月 2020 17:57:33 +0800 Subject: [PATCH] 修复在线用户判断逻辑 --- ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java index 8989ca1..121681b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java @@ -144,7 +144,10 @@ public static void main(String[] args) { - String html = "alert('11111');"; + String html = "<script>alert(1);</script>"; + // String html = "<scr<script>ipt>alert(\"XSS\")</scr<script>ipt>"; + // String html = "<123"; + // String html = "123>"; System.out.println(EscapeUtil.clean(html)); System.out.println(EscapeUtil.escape(html)); System.out.println(EscapeUtil.unescape(html)); -- Gitblit v1.9.3