Skip to content

Commit

Permalink
fixup! feat(security): Add a bruteforce protection backend base on me…
Browse files Browse the repository at this point in the history
…mcache
  • Loading branch information
nickvergessen committed Aug 16, 2023
1 parent 0c7bc29 commit e33b647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,8 @@ public function __construct($webRoot, \OC\Config $config) {
$this->registerAlias(IThrottler::class, Throttler::class);

$this->registerService(\OC\Security\Bruteforce\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 = $c->get(\OC\Security\Bruteforce\Backend\MemoryCacheBackend::class);
} else {
$backend = $c->get(\OC\Security\Bruteforce\Backend\DatabaseBackend::class);
Expand Down

0 comments on commit e33b647

Please sign in to comment.