mirror of
https://github.com/nextcloud/server.git
synced 2026-02-22 01:11:23 -05:00
Limit throttler to 48 hours
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6c1b542def
commit
8fae2beece
1 changed files with 5 additions and 0 deletions
|
|
@ -226,6 +226,11 @@ class Throttler {
|
|||
* @return 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 === '') {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue