From adbebf1409e3f743d8f275440dabc00baebc1c19 Mon Sep 17 00:00:00 2001 From: VitalD Date: Tue, 8 Sep 2026 08:57:09 +0300 Subject: [PATCH] Fix BAS BlockIP path: make public and use IndexBot::Checking. WAFSystem calls Api::BlockIP on isBas detection, but BlockIP was private and referenced non-existent IndexBot::isIndexbot(), causing a PHP error instead of blacklisting the IP. Co-authored-by: Cursor --- includes/Api.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Api.class.php b/includes/Api.class.php index 8940e9f..543e777 100644 --- a/includes/Api.class.php +++ b/includes/Api.class.php @@ -172,11 +172,11 @@ public function getData() /** * Блокирует айпи, если его нет в белых списках и других правилах исключения */ - private function BlockIP($client_ip, $message) + public function BlockIP($client_ip, $message) { if ( !($this->WAFSystem->WhiteListIP->isListed($client_ip) - || ($this->WAFSystem->IndexBot->enabled && $this->WAFSystem->IndexBot->isIndexbot($client_ip)) + || ($this->WAFSystem->IndexBot->enabled && $this->WAFSystem->IndexBot->Checking($client_ip)) ) ) { $this->WAFSystem->BlackListIP->add($this->WAFSystem->Profile->IP, $message);