Skip to content

Commit 16a98ee

Browse files
author
Daniel Neto
committed
Increase rate limit for user registration and deactivation to prevent abuse
1 parent b0228fd commit 16a98ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/API/API.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4026,7 +4026,7 @@ public function set_api_signUp($parameters)
40264026
}
40274027

40284028
// Rate limiting for user registration (prevent abuse)
4029-
$this->checkRateLimit('user_registration', 3, 600); // 3 attempts per 10 minutes
4029+
$this->checkRateLimit('user_registration', 10, 600); // 10 attempts per 10 minutes
40304030

40314031
$ignoreCaptcha = 1;
40324032
if (isset($_REQUEST['emailVerified'])) {
@@ -5492,7 +5492,7 @@ public function set_api_user_inactive($parameters)
54925492
}
54935493

54945494
// Rate limiting check (prevent abuse)
5495-
$this->checkRateLimit('user_deactivation', 5, 300); // 5 attempts per 5 minutes
5495+
$this->checkRateLimit('user_deactivation', 10, 300); // 10 attempts per 5 minutes
54965496

54975497
// Execute the deactivation
54985498
$targetUser->setStatus('i');

0 commit comments

Comments
 (0)