diff options
author | Joas Schilling <coding@schilljs.com> | 2023-08-16 17:40:38 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-08-21 16:40:24 +0200 |
commit | 124588d4a64f518aef9270002e72c3604ddb3077 (patch) | |
tree | 6de1383e2ec21fb17fd9e908ab7638932617a681 /core/Command | |
parent | b2fd283a300d0c5b260d50bbf6ab7574b24dafe9 (diff) | |
download | nextcloud-server-124588d4a64f518aef9270002e72c3604ddb3077.tar.gz nextcloud-server-124588d4a64f518aef9270002e72c3604ddb3077.zip |
fix: Make bypass function public API
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Security/BruteforceAttempts.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/Command/Security/BruteforceAttempts.php b/core/Command/Security/BruteforceAttempts.php index 9cbf446958d..9237078339d 100644 --- a/core/Command/Security/BruteforceAttempts.php +++ b/core/Command/Security/BruteforceAttempts.php @@ -25,21 +25,16 @@ declare(strict_types=1); namespace OC\Core\Command\Security; use OC\Core\Command\Base; -use OC\Security\Bruteforce\Throttler; use OCP\Security\Bruteforce\IThrottler; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class BruteforceAttempts extends Base { - /** @var Throttler */ - protected IThrottler $throttler; - public function __construct( - IThrottler $throttler, + protected IThrottler $throttler, ) { parent::__construct(); - $this->throttler = $throttler; } protected function configure(): void { @@ -69,7 +64,7 @@ class BruteforceAttempts extends Base { } $data = [ - 'allow-listed' => $this->throttler->isIPWhitelisted($ip), + 'bypass-listed' => $this->throttler->isBypassListed($ip), 'attempts' => $this->throttler->getAttempts( $ip, (string) $input->getArgument('action'), |