Merge pull request #33158 from nextcloud/backport/33153/stable23

This commit is contained in:
John Molakvoæ 2022-07-08 08:28:39 +02:00 committed by GitHub
commit b93bde1c76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
/**