From: Julius Härtl Date: Fri, 25 Sep 2020 10:03:55 +0000 (+0200) Subject: Avoid checking for brute force protection capabilities when upgrading X-Git-Tag: v20.0.4~1^2~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=934f8a17f9e5f373be59fdf88d1303d8e89eb487;p=nextcloud-server.git Avoid checking for brute force protection capabilities when upgrading This might happen a releases that doesn't have this table yet Signed-off-by: Julius Härtl --- 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())