From 9ff8b1b4642b0b963cb0b9806c8d9ae488325a1b Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Mon, 27 Apr 2026 21:16:26 +0200 Subject: [PATCH] fix: call RateLimit::checkKey() as instance method in request-access.php --- app/public/request-access.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/public/request-access.php b/app/public/request-access.php index d456b18..9ca88fe 100644 --- a/app/public/request-access.php +++ b/app/public/request-access.php @@ -87,7 +87,7 @@ if ($accessTypeId !== 2) { // Rate limiting: max 3 requests per 10 minutes per IP $rateLimitKey = 'access_request_' . ($_SERVER['REMOTE_ADDR'] ?? 'unknown'); -if (!RateLimit::check($rateLimitKey, 3, 600)) { +if (!(new RateLimit(3, 600))->checkKey($rateLimitKey)) { http_response_code(429); echo json_encode(['success' => false, 'message' => 'Trop de requêtes. Veuillez réessayer dans quelques minutes.']); exit;