From a31939cb873f806c2b02c8cec9649ff463dd1bf9 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Tue, 10 Dec 2024 15:56:18 +0200 Subject: [PATCH] Skip rate limiting for whitelisted --- app/classes/ratelimitrer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/classes/ratelimitrer.php b/app/classes/ratelimitrer.php index 628bfd0..98c9926 100644 --- a/app/classes/ratelimitrer.php +++ b/app/classes/ratelimitrer.php @@ -92,6 +92,11 @@ class RateLimiter { } public function attempt($username, $ipAddress) { + // Skip rate limiting for whitelisted IPs + if ($this->isIpWhitelisted($ipAddress)) { + return true; + } + // Clean old attempts $this->clearOldAttempts();