From 8d64addc1732f567e696ebfdeda89ec452609eda Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Fri, 6 Oct 2023 23:53:18 +0300 Subject: [PATCH] =?UTF-8?q?[*]=20=D1=81=D1=85=D0=BE=D0=B4=D1=83=20=D1=81?= =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/bootstrap.php | 4 ++-- core/lib/Core/Helpers/DDosProtection.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/bootstrap.php b/core/bootstrap.php index f37c0f3..1d9222a 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -138,7 +138,7 @@ User::logout(); } - $ddosProtectObject = new DDosProtection('bootstrap'); + $ddosProtectObject = new DDosProtection(basename(__FILE__)); try { $userId = User::getCurrentUserId(); } catch (CoreException $e) { @@ -146,8 +146,8 @@ } if (!empty($userId)) { try { - $ddosProtectObject->setUserId($userId); $USER = new User($userId); + $ddosProtectObject->setUserId($userId); } catch (CoreException $e) { $USER = null; } diff --git a/core/lib/Core/Helpers/DDosProtection.class.php b/core/lib/Core/Helpers/DDosProtection.class.php index 1e3c914..5ac6d07 100644 --- a/core/lib/Core/Helpers/DDosProtection.class.php +++ b/core/lib/Core/Helpers/DDosProtection.class.php @@ -38,9 +38,9 @@ private ?string $observedKey = null; - private int $maxAttempts = 5; + private int $maxAttempts = 10; - private int $timeInterval = 20; + private int $timeInterval = 10; public function __construct(?string $place = null)