diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-07-08 08:28:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 08:28:39 +0200 |
commit | b93bde1c7660ff189e2c1fbc65e3f2501ed3c6c0 (patch) | |
tree | fe84cd279ce032845b94580d17d4e907fa338457 /lib/private | |
parent | f8d196ef9fa89723a1bda350cd26214e4ddfa02d (diff) | |
parent | 3c24ba359f6a9fce2ec845513ce05a88ab876b1a (diff) | |
download | nextcloud-server-b93bde1c7660ff189e2c1fbc65e3f2501ed3c6c0.tar.gz nextcloud-server-b93bde1c7660ff189e2c1fbc65e3f2501ed3c6c0.zip |
Merge pull request #33158 from nextcloud/backport/33153/stable23
Diffstat (limited to 'lib/private')
-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; } /** |