mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	修复开启WAF后,自动记录请求Body的Bug
This commit is contained in:
		@@ -218,7 +218,7 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	goNext, hasRequestBody, ruleGroup, ruleSet, err := w.MatchRequest(this, this.writer)
 | 
			
		||||
	if forceLog && logRequestBody && hasRequestBody {
 | 
			
		||||
	if forceLog && logRequestBody && hasRequestBody && ruleSet != nil && ruleSet.HasAttackActions() {
 | 
			
		||||
		this.wafHasRequestBody = true
 | 
			
		||||
	}
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -294,7 +294,7 @@ func (this *HTTPRequest) checkWAFResponse(firewallPolicy *firewallconfigs.HTTPFi
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	goNext, hasRequestBody, ruleGroup, ruleSet, err := w.MatchResponse(this, resp, this.writer)
 | 
			
		||||
	if forceLog && logRequestBody && hasRequestBody {
 | 
			
		||||
	if forceLog && logRequestBody && hasRequestBody && ruleSet != nil && ruleSet.HasAttackActions() {
 | 
			
		||||
		this.wafHasRequestBody = true
 | 
			
		||||
	}
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user