aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-04-03 07:23:34 +0200
committerJoas Schilling <coding@schilljs.com>2023-04-03 09:06:45 +0200
commit454281af03fb0e917f0135cd6ce51fec5024a0b4 (patch)
tree74aa24a99725bd1fe7d40b9b48674840517fd20d /lib/private/Server.php
parentb5da85df3a83da23d13437d13486ceabc738fc24 (diff)
downloadnextcloud-server-454281af03fb0e917f0135cd6ce51fec5024a0b4.tar.gz
nextcloud-server-454281af03fb0e917f0135cd6ce51fec5024a0b4.zip
feat(security): Allow to opt-out of ratelimit protection, e.g. for testing on CI
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index f1e96170886..e71fd0a9c29 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -846,11 +846,13 @@ class Server extends ServerContainer implements IServerContainer {
$cacheFactory = $c->get(ICacheFactory::class);
if ($cacheFactory->isAvailable()) {
$backend = new \OC\Security\RateLimiting\Backend\MemoryCacheBackend(
+ $c->get(AllConfig::class),
$this->get(ICacheFactory::class),
new \OC\AppFramework\Utility\TimeFactory()
);
} else {
$backend = new \OC\Security\RateLimiting\Backend\DatabaseBackend(
+ $c->get(AllConfig::class),
$c->get(IDBConnection::class),
new \OC\AppFramework\Utility\TimeFactory()
);