Commit 9d55a3ea authored by zengtianlai3's avatar zengtianlai3

对用户输入的大小进行了合理校验 ,无效,撤销

parent af995c0c
...@@ -50,10 +50,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { ...@@ -50,10 +50,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
private String getBodyString(HttpServletRequest httpservletrequest) throws IOException { private String getBodyString(HttpServletRequest httpservletrequest) throws IOException {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
InputStream ins = httpservletrequest.getInputStream(); InputStream ins = httpservletrequest.getInputStream();
int available = ins.available();
if (available > 20000) {
throw new IotLicenseException(ResultCode.VALIDATE_FAILED.getCode(), "数据过大");
}
boolean isMultipartContent = ServletFileUpload.isMultipartContent(httpservletrequest); boolean isMultipartContent = ServletFileUpload.isMultipartContent(httpservletrequest);
CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver(httpservletrequest.getSession().getServletContext()); CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver(httpservletrequest.getSession().getServletContext());
boolean isMultipart = commonsMultipartResolver.isMultipart(httpservletrequest); boolean isMultipart = commonsMultipartResolver.isMultipart(httpservletrequest);
......
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