diff options
Diffstat (limited to 'lib/private/Security/Bruteforce/Throttler.php')
-rw-r--r-- | lib/private/Security/Bruteforce/Throttler.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php index abbe77c6637..1805574cfb7 100644 --- a/lib/private/Security/Bruteforce/Throttler.php +++ b/lib/private/Security/Bruteforce/Throttler.php @@ -66,8 +66,8 @@ class Throttler { private $logger; /** @var IConfig */ private $config; - /** @var bool */ - private $hasAttemptsDeleted = false; + /** @var bool[] */ + private $hasAttemptsDeleted = []; /** * @param IDBConnection $db @@ -232,7 +232,7 @@ class Throttler { $maxAgeHours = 48; } - if ($ip === '' || $this->hasAttemptsDeleted) { + if ($ip === '' || isset($this->hasAttemptsDeleted[$action])) { return 0; } @@ -310,7 +310,7 @@ class Throttler { $qb->executeStatement(); - $this->hasAttemptsDeleted = true; + $this->hasAttemptsDeleted[$action] = true; } /** |