ÎļþÃû´Ó ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.common.filter; |
| | | package com.ruoyi.common.web.filter; |
| | | |
| | | import cn.hutool.core.io.IoUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HtmlUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | |
| | |
| | | String[] values = super.getParameterValues(name); |
| | | if (values != null) { |
| | | int length = values.length; |
| | | String[] escapesValues = new String[length]; |
| | | String[] escapseValues = new String[length]; |
| | | for (int i = 0; i < length; i++) { |
| | | // é²xssæ»å»åè¿æ»¤ååç©ºæ ¼ |
| | | escapesValues[i] = HtmlUtil.cleanHtmlTag(values[i]).trim(); |
| | | escapseValues[i] = HtmlUtil.cleanHtmlTag(values[i]).trim(); |
| | | } |
| | | return escapesValues; |
| | | return escapseValues; |
| | | } |
| | | return super.getParameterValues(name); |
| | | } |