WAF SQL注入检测时支持 (http|https):// 开头的URL

This commit is contained in:
GoEdgeLab
2023-12-07 20:38:06 +08:00
parent 94e6717c65
commit 1e0c2a932d
2 changed files with 2 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ func DetectSQLInjection(input string) bool {
}
// 兼容 /PATH?URI
if input[0] == '/' {
if input[0] == '/' || strings.HasPrefix(input, "http://") || strings.HasPrefix(input, "https://") {
var argsIndex = strings.Index(input, "?")
if argsIndex > 0 {
var args = input[argsIndex+1:]