From 43ed8ad44b308e0dd012f1dab22690c34196b107 Mon Sep 17 00:00:00 2001 From: KeYuan Date: Sat, 1 Jul 2017 18:05:01 +0800 Subject: [PATCH] mismatched tree node: EOF expecting --- src/main/java/com/key/common/plugs/xss/XssHttpWrapper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/key/common/plugs/xss/XssHttpWrapper.java b/src/main/java/com/key/common/plugs/xss/XssHttpWrapper.java index fdfc1e7..3bab846 100644 --- a/src/main/java/com/key/common/plugs/xss/XssHttpWrapper.java +++ b/src/main/java/com/key/common/plugs/xss/XssHttpWrapper.java @@ -204,6 +204,12 @@ public class XssHttpWrapper extends HttpServletRequestWrapper { return result; } + /** + * 处理插件之所以报 mismatched tree node: EOF expecting错误是因为其对注入的脚本格式有校验 + * 比如注入而没有匹配的结束标签时会报该错误,注入代码中开始标签和结束标签不匹配时会出该问题 + * @param value + * @return + */ private String stripXSS(String value) { if (value != null)