Commit ee847bc3 authored by zengtianlai3's avatar zengtianlai3

代码质量:byte数组转String时未指定编码

parent 97a7a654
......@@ -78,7 +78,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
// 非文件上传进行过滤
if (!fileUpload) {
// 获取body中的请求参数
JSONObject json = JSONObject.parseObject(new String(body));
JSONObject json = JSONObject.parseObject(new String(body, StandardCharsets.UTF_8));
// 校验并过滤xss攻击和sql注入
for (String k : json.keySet()) {
cleanSQLInject(cleanXSS(json.getString(k)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment