summaryrefslogtreecommitdiffstats
path: root/lib/private/Security/Bruteforce/Capabilities.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-09-25 12:03:55 +0200
committerJulius Härtl <jus@bitgrid.net>2020-12-09 12:13:33 +0100
commitf5501ca2764caae5c0f53949c47ded4ba8ad3c17 (patch)
treeda8c411125464223c1cdc91b4a1bdb138bae33ba /lib/private/Security/Bruteforce/Capabilities.php
parent83f4f480ab72c6e90545f0529c5ad1c7d2090f2f (diff)
downloadnextcloud-server-f5501ca2764caae5c0f53949c47ded4ba8ad3c17.tar.gz
nextcloud-server-f5501ca2764caae5c0f53949c47ded4ba8ad3c17.zip
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 <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Security/Bruteforce/Capabilities.php')
-rw-r--r--lib/private/Security/Bruteforce/Capabilities.php4
1 files changed, 4 insertions, 0 deletions
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())