From 76f4e0e3c8648f417e951fbb809201dcba0bc0bc Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Fri, 3 Jan 2025 17:02:49 +0200 Subject: [PATCH] Prepare for logging --- app/classes/ratelimitrer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/classes/ratelimitrer.php b/app/classes/ratelimitrer.php index 4619bfb..967581b 100644 --- a/app/classes/ratelimitrer.php +++ b/app/classes/ratelimitrer.php @@ -2,6 +2,7 @@ class RateLimiter { private $db; + private $log; private $maxAttempts = 5; // Maximum login attempts private $decayMinutes = 15; // Time window in minutes private $ratelimitTable = 'login_attempts'; @@ -9,6 +10,7 @@ class RateLimiter { public function __construct($database) { $this->db = $database->getConnection(); + $this->log = new Log($database); $this->createTablesIfNotExists(); }