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

@@ -21,6 +21,7 @@ func TestDetectSQLInjection(t *testing.T) {
a.IsFalse(injectionutils.DetectSQLInjection("/hello?age=22"))
a.IsTrue(injectionutils.DetectSQLInjection("/sql/injection?id=123 or 1=1"))
a.IsTrue(injectionutils.DetectSQLInjection("/sql/injection?id=123%20or%201=1"))
a.IsTrue(injectionutils.DetectSQLInjection("https://example.com/sql/injection?id=123%20or%201=1"))
}
func BenchmarkDetectSQLInjection(b *testing.B) {