summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Scherzinger <info@andy-scherzinger.de>2023-09-06 19:33:19 +0200
committerGitHub <noreply@github.com>2023-09-06 19:33:19 +0200
commitdd52ddf4f8e2baf6d732370fc3e43db3c23a7879 (patch)
tree51180b4638ad5f84fd10eca4b5c0aa0ab7de692d
parent42e70cf63964cffdcedf62d4179bb51fad7d577e (diff)
parent52d68d310908fe8e74ffe57ca9b61286da94c667 (diff)
downloadnextcloud-server-dd52ddf4f8e2baf6d732370fc3e43db3c23a7879.tar.gz
nextcloud-server-dd52ddf4f8e2baf6d732370fc3e43db3c23a7879.zip
Merge pull request #40300 from nextcloud/backport/40293/stable27
[stable27] fix(ratelimit): Only use memory cache backend for redis
-rw-r--r--lib/private/Server.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 68bf3d76f36..2d2f2cd9a9b 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -846,8 +846,8 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerDeprecatedAlias('Search', ISearch::class);
$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
- $cacheFactory = $c->get(ICacheFactory::class);
- if ($cacheFactory->isAvailable()) {
+ $config = $c->get(\OCP\IConfig::class);
+ if (ltrim($config->getSystemValueString('memcache.distributed', ''), '\\') === \OC\Memcache\Redis::class) {
$backend = new \OC\Security\RateLimiting\Backend\MemoryCacheBackend(
$c->get(AllConfig::class),
$this->get(ICacheFactory::class),