mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-06 08:07:27 +02:00
Use 'throttling' flag in 'Auth#forgotPassword' when limiting requests
This commit is contained in:
@@ -1004,7 +1004,7 @@ final class Auth extends UserManager {
|
||||
throw new ResetDisabledException();
|
||||
}
|
||||
|
||||
$openRequests = (int) $this->getOpenPasswordResetRequests($userData['id']);
|
||||
$openRequests = $this->throttling ? (int) $this->getOpenPasswordResetRequests($userData['id']) : 0;
|
||||
|
||||
if ($openRequests < $maxOpenRequests) {
|
||||
$this->throttle([ 'requestPasswordReset', $this->getIpAddress() ], 4, (60 * 60 * 24 * 7), 2);
|
||||
|
Reference in New Issue
Block a user