【fix sonar】XSSUtils文件
This commit is contained in:
+3
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.system.util;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.util.HtmlUtils;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
@@ -9,6 +10,7 @@ import java.util.regex.Pattern;
|
||||
* @author: lsq
|
||||
* @date: 2021年07月26日 19:13
|
||||
*/
|
||||
@Slf4j
|
||||
public class XSSUtils {
|
||||
public static String striptXSS(String value) {
|
||||
if (value != null) {
|
||||
@@ -39,6 +41,6 @@ public class XSSUtils {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String s = striptXSS("<img src=x onload=alert(111).*?><script></script>javascript:eval()\\\\.");
|
||||
System.err.println("s======>" + s);
|
||||
log.info("s======>" + s);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user