From 5adccd81928b46a2250efe7c649cdda2339731cd Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Tue, 16 Jan 2024 21:13:10 +0800 Subject: [PATCH] =?UTF-8?q?XSS=E6=A3=80=E6=B5=8B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/waf/injectionutils/utils_xss_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/waf/injectionutils/utils_xss_test.go b/internal/waf/injectionutils/utils_xss_test.go index 91ef826..53e32b6 100644 --- a/internal/waf/injectionutils/utils_xss_test.go +++ b/internal/waf/injectionutils/utils_xss_test.go @@ -44,6 +44,8 @@ func TestDetectXSS_Strict(t *testing.T) { a.IsFalse(injectionutils.DetectXSS(``, true)) a.IsFalse(injectionutils.DetectXSS(``, false)) a.IsTrue(injectionutils.DetectXSS(``, true)) + a.IsFalse(injectionutils.DetectXSS("https://example.com?style=list", false)) + a.IsTrue(injectionutils.DetectXSS("https://example.com?style=list", true)) } func BenchmarkDetectXSS_MISS(b *testing.B) {