mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-08 09:06:29 +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();
|
throw new ResetDisabledException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$openRequests = (int) $this->getOpenPasswordResetRequests($userData['id']);
|
$openRequests = $this->throttling ? (int) $this->getOpenPasswordResetRequests($userData['id']) : 0;
|
||||||
|
|
||||||
if ($openRequests < $maxOpenRequests) {
|
if ($openRequests < $maxOpenRequests) {
|
||||||
$this->throttle([ 'requestPasswordReset', $this->getIpAddress() ], 4, (60 * 60 * 24 * 7), 2);
|
$this->throttle([ 'requestPasswordReset', $this->getIpAddress() ], 4, (60 * 60 * 24 * 7), 2);
|
||||||
|
Reference in New Issue
Block a user