mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	XSS检测增加测试用例
This commit is contained in:
		@@ -44,6 +44,8 @@ func TestDetectXSS_Strict(t *testing.T) {
 | 
			
		||||
	a.IsFalse(injectionutils.DetectXSS(`<a href="aaaa"></a>`, true))
 | 
			
		||||
	a.IsFalse(injectionutils.DetectXSS(`<span style="color: red"></span>`, false))
 | 
			
		||||
	a.IsTrue(injectionutils.DetectXSS(`<span style="color: red"></span>`, 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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user