From c504b37118974e496a655a41bc7511cb432fbbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 3 Dec 2023 14:41:11 +0800 Subject: [PATCH] =?UTF-8?q?WAF=E7=9B=B8=E5=85=B3=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E4=B8=8D=E8=AE=A1=E5=85=A5=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/waf/action_captcha.go | 1 + internal/waf/action_get_302.go | 1 + internal/waf/action_post_307.go | 1 + 3 files changed, 3 insertions(+) diff --git a/internal/waf/action_captcha.go b/internal/waf/action_captcha.go index 0daa138..f05e4ff 100644 --- a/internal/waf/action_captcha.go +++ b/internal/waf/action_captcha.go @@ -159,6 +159,7 @@ func (this *CaptchaAction) Perform(waf *WAF, group *RuleGroup, set *RuleSet, req // 占用一次失败次数 CaptchaIncreaseFails(req, this, waf.Id, group.Id, set.Id, CaptchaPageCodeInit) + req.DisableStat() req.ProcessResponseHeaders(writer.Header(), http.StatusTemporaryRedirect) http.Redirect(writer, req.WAFRaw(), CaptchaPath+"?info="+url.QueryEscape(info), http.StatusTemporaryRedirect) diff --git a/internal/waf/action_get_302.go b/internal/waf/action_get_302.go index bf4139f..5a14aa0 100644 --- a/internal/waf/action_get_302.go +++ b/internal/waf/action_get_302.go @@ -67,6 +67,7 @@ func (this *Get302Action) Perform(waf *WAF, group *RuleGroup, set *RuleSet, requ return true, false } + request.DisableStat() request.ProcessResponseHeaders(writer.Header(), http.StatusFound) http.Redirect(writer, request.WAFRaw(), Get302Path+"?info="+url.QueryEscape(info), http.StatusFound) diff --git a/internal/waf/action_post_307.go b/internal/waf/action_post_307.go index d2b238b..ac9fcef 100644 --- a/internal/waf/action_post_307.go +++ b/internal/waf/action_post_307.go @@ -92,6 +92,7 @@ func (this *Post307Action) Perform(waf *WAF, group *RuleGroup, set *RuleSet, req Value: info, }) + request.DisableStat() request.ProcessResponseHeaders(writer.Header(), http.StatusTemporaryRedirect) http.Redirect(writer, request.WAFRaw(), request.WAFRaw().URL.String(), http.StatusTemporaryRedirect)