Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-07-08 09:28:39 +0300
committerGitHub <noreply@github.com>2022-07-08 09:28:39 +0300
commitb93bde1c7660ff189e2c1fbc65e3f2501ed3c6c0 (patch)
treefe84cd279ce032845b94580d17d4e907fa338457
parentf8d196ef9fa89723a1bda350cd26214e4ddfa02d (diff)
parent3c24ba359f6a9fce2ec845513ce05a88ab876b1a (diff)
Merge pull request #33158 from nextcloud/backport/33153/stable23
-rw-r--r--lib/private/Security/Bruteforce/Throttler.php8
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;
}
/**