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

This commit is contained in:
刘祥超
2023-12-07 20:38:06 +08:00
parent cc10372fe1
commit 50c6c60abf
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:]