fix: 解决命令注入waf被绕过的问题 (#4131)

This commit is contained in:
L1nyz-tel 2024-03-08 22:43:56 +08:00 committed by GitHub
parent 2687c91e65
commit ba63907a65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,7 +177,8 @@ func CheckIllegal(args ...string) bool {
for _, arg := range args {
if strings.Contains(arg, "&") || strings.Contains(arg, "|") || strings.Contains(arg, ";") ||
strings.Contains(arg, "$") || strings.Contains(arg, "'") || strings.Contains(arg, "`") ||
strings.Contains(arg, "(") || strings.Contains(arg, ")") || strings.Contains(arg, "\"") {
strings.Contains(arg, "(") || strings.Contains(arg, ")") || strings.Contains(arg, "\"") ||
strings.Contains(arg, "\n") || strings.Contains(arg, "\r") {
return true
}
}