Limit throttler to 48 hours
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6c1b542def
commit
8fae2beece
|
@ -226,6 +226,11 @@ class Throttler {
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getAttempts(string $ip, string $action = '', float $maxAgeHours = 12): int {
|
public function getAttempts(string $ip, string $action = '', float $maxAgeHours = 12): int {
|
||||||
|
if ($maxAgeHours > 48) {
|
||||||
|
$this->logger->error('Bruteforce has to use less than 48 hours');
|
||||||
|
$maxAgeHours = 48;
|
||||||
|
}
|
||||||
|
|
||||||
if ($ip === '') {
|
if ($ip === '') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue