From 934f8a17f9e5f373be59fdf88d1303d8e89eb487 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Fri, 25 Sep 2020 12:03:55 +0200 Subject: [PATCH] Avoid checking for brute force protection capabilities when upgrading MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This might happen a releases that doesn't have this table yet Signed-off-by: Julius Härtl --- lib/private/Security/Bruteforce/Capabilities.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Security/Bruteforce/Capabilities.php b/lib/private/Security/Bruteforce/Capabilities.php index eab55db1c90..fcf05efbd7e 100644 --- a/lib/private/Security/Bruteforce/Capabilities.php +++ b/lib/private/Security/Bruteforce/Capabilities.php @@ -46,6 +46,10 @@ class Capabilities implements IPublicCapability { } public function getCapabilities() { + if (version_compare(\OC::$server->getConfig()->getSystemValue('version', '0.0.0.0'), '12.0.0.0', '<')) { + return []; + } + return [ 'bruteforce' => [ 'delay' => $this->throttler->getDelay($this->request->getRemoteAddress()) -- 2.39.5