From 6d52b022b21b8df2b04635c41d29280c1ca56b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 5 Apr 2023 19:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E9=97=AE=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E5=9F=9F=E5=90=8D=E5=8A=A0=E5=85=A5=E5=88=B0=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E6=97=B6=EF=BC=8C=E5=8F=AA=E5=AF=B9=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E8=8A=82=E7=82=B9=E6=9C=89=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_mismatch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nodes/http_request_mismatch.go b/internal/nodes/http_request_mismatch.go index 46866f2..5761431 100644 --- a/internal/nodes/http_request_mismatch.go +++ b/internal/nodes/http_request_mismatch.go @@ -41,7 +41,7 @@ func (this *HTTPRequest) doMismatch() { if ttlcache.SharedCache.IncreaseInt64("MISMATCH_DOMAIN:"+remoteIP, int64(1), time.Now().Unix()+60, false) > maxAttempts { // 在加入之前再次检查黑名单 if !waf.SharedIPBlackList.Contains(waf.IPTypeAll, firewallconfigs.FirewallScopeGlobal, 0, remoteIP) { - waf.SharedIPBlackList.RecordIP(waf.IPTypeAll, firewallconfigs.FirewallScopeGlobal, 0, remoteIP, time.Now().Unix()+int64(3600), 0, true, 0, 0, "access mismatch domain '"+this.RawReq.Host+"' too frequently") + waf.SharedIPBlackList.Add(waf.IPTypeAll, firewallconfigs.FirewallScopeGlobal, 0, remoteIP, time.Now().Unix()+3600) } } }