From a96d4bf2eda9dfde4a8efdb32cb619b95c80ab1e Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期六, 29 六月 2024 19:08:09 +0800 Subject: [PATCH] 菜单管理新增路由名称 --- ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java index c0ab6e5..e0cc40a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java @@ -34,13 +34,13 @@ if (values != null) { int length = values.length; - String[] escapseValues = new String[length]; + String[] escapesValues = new String[length]; for (int i = 0; i < length; i++) { // 防xss攻击和过滤前后空格 - escapseValues[i] = EscapeUtil.clean(values[i]).trim(); + escapesValues[i] = EscapeUtil.clean(values[i]).trim(); } - return escapseValues; + return escapesValues; } return super.getParameterValues(name); } @@ -63,7 +63,8 @@ // xss过滤 json = EscapeUtil.clean(json).trim(); - final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8")); + byte[] jsonBytes = json.getBytes("utf-8"); + final ByteArrayInputStream bis = new ByteArrayInputStream(jsonBytes); return new ServletInputStream() { @Override @@ -79,6 +80,12 @@ } @Override + public int available() throws IOException + { + return jsonBytes.length; + } + + @Override public void setReadListener(ReadListener readListener) { } -- Gitblit v1.9.2