diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-07-08 08:28:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 08:28:29 +0200 |
commit | dec16a9543b4489767bb726b5bc44cabf17522f4 (patch) | |
tree | b2cee0b15630b2e475329e2008f364e93a1314aa /lib | |
parent | 09d6d02234fe02f073d0f589a19d1b6670d85ca7 (diff) | |
parent | d306757ffb52c964f67fe8d203df61fc8a102603 (diff) | |
download | nextcloud-server-dec16a9543b4489767bb726b5bc44cabf17522f4.tar.gz nextcloud-server-dec16a9543b4489767bb726b5bc44cabf17522f4.zip |
Merge pull request #33157 from nextcloud/backport/33153/stable24
Diffstat (limited to 'lib')
-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 c47d102b881..e37746eb6a2 100644 --- a/lib/private/Security/Bruteforce/Throttler.php +++ b/lib/private/Security/Bruteforce/Throttler.php @@ -65,8 +65,8 @@ class Throttler { private LoggerInterface $logger; /** @var IConfig */ private $config; - /** @var bool */ - private $hasAttemptsDeleted = false; + /** @var bool[] */ + private $hasAttemptsDeleted = []; public function __construct(IDBConnection $db, ITimeFactory $timeFactory, @@ -225,7 +225,7 @@ class Throttler { $maxAgeHours = 48; } - if ($ip === '' || $this->hasAttemptsDeleted) { + if ($ip === '' || isset($this->hasAttemptsDeleted[$action])) { return 0; } @@ -303,7 +303,7 @@ class Throttler { $qb->executeStatement(); - $this->hasAttemptsDeleted = true; + $this->hasAttemptsDeleted[$action] = true; } /** |