WAF SQL注入检测和XSS注入检测自动进行URL解码

This commit is contained in:
GoEdgeLab
2023-12-10 16:52:54 +08:00
parent d19d57f7c9
commit 802a2a92d3
4 changed files with 14 additions and 1 deletions

View File

@@ -68,6 +68,11 @@ func DetectXSS(input string) bool {
return detectXSSOne(args)
}
}
} else {
unescapedInput, err := url.QueryUnescape(input)
if err == nil && input != unescapedInput {
return detectXSSOne(unescapedInput)
}
}
return false