Fix: Increase wallet login rate limit to 50 attempts
This commit is contained in:
@@ -441,9 +441,9 @@ class AuthController extends Controller
|
||||
return $this->failure('Invalid audience', 403);
|
||||
}
|
||||
|
||||
// Stricter rate limit for wallet
|
||||
// Stricter rate limit for wallet (50 attempts per 2 minutes)
|
||||
$rateLimitKey = 'wallet_login:' . $request->ip();
|
||||
if (Cache::get($rateLimitKey, 0) >= 3) {
|
||||
if (Cache::get($rateLimitKey, 0) >= 50) {
|
||||
return $this->failure('Too many attempts', 429);
|
||||
}
|
||||
Cache::increment($rateLimitKey);
|
||||
@@ -507,9 +507,9 @@ class AuthController extends Controller
|
||||
return $this->failure('Invalid audience', 403);
|
||||
}
|
||||
|
||||
// Rate limit
|
||||
// Rate limit (50 attempts per 2 minutes)
|
||||
$rateLimitKey = 'wallet_login_driver:' . $request->ip();
|
||||
if (Cache::get($rateLimitKey, 0) >= 3) {
|
||||
if (Cache::get($rateLimitKey, 0) >= 50) {
|
||||
return $this->failure('Too many attempts', 429);
|
||||
}
|
||||
Cache::increment($rateLimitKey);
|
||||
|
||||
Reference in New Issue
Block a user