Browse Source

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

pull/4273/head
an4er 8 months ago committed by GitHub
parent
commit
1ff5bf85e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      backend/utils/cmd/cmd.go

2
backend/utils/cmd/cmd.go

@ -178,7 +178,7 @@ func CheckIllegal(args ...string) bool {
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, "\n") || strings.Contains(arg, "\r") {
strings.Contains(arg, "\n") || strings.Contains(arg, "\r") || strings.Contains(arg, ">") {
return true
}
}

Loading…
Cancel
Save