From 63a1af9f74a1039a18a03d12759a816ead39cd8b Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 7 Dec 2023 20:47:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/waf/injectionutils/utils_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/waf/injectionutils/utils_test.go b/internal/waf/injectionutils/utils_test.go index aa67452..10af15a 100644 --- a/internal/waf/injectionutils/utils_test.go +++ b/internal/waf/injectionutils/utils_test.go @@ -17,6 +17,7 @@ func TestDetectSQLInjection(t *testing.T) { a.IsFalse(injectionutils.DetectSQLInjection("1234")) a.IsFalse(injectionutils.DetectSQLInjection("")) a.IsTrue(injectionutils.DetectSQLInjection("id=123 OR 1=1&b=2")) + a.IsTrue(injectionutils.DetectSQLInjection("id=123&b=456&c=1' or 2=2")) a.IsFalse(injectionutils.DetectSQLInjection("?")) a.IsFalse(injectionutils.DetectSQLInjection("/hello?age=22")) a.IsTrue(injectionutils.DetectSQLInjection("/sql/injection?id=123 or 1=1")) @@ -44,7 +45,6 @@ func BenchmarkDetectSQLInjection_URL(b *testing.B) { }) } - func BenchmarkDetectSQLInjection_URL_Unescape(b *testing.B) { runtime.GOMAXPROCS(4)