]> source.dussan.org Git - nextcloud-server.git/commitdiff
ensure that factoryClass exisits before instantiation
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 30 Jun 2021 13:09:27 +0000 (15:09 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 30 Jun 2021 13:09:27 +0000 (15:09 +0200)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
lib/private/Server.php

index 207c53bdae372ad4a1617c1c5d7df66012e11018..03d6a4146ed0f8cd9eac93f2c1a15a1b4e7592e5 100644 (file)
@@ -1031,7 +1031,7 @@ class Server extends ServerContainer implements IServerContainer {
                $this->registerService(ILDAPProviderFactory::class, function (ContainerInterface $c) {
                        $config = $c->get(\OCP\IConfig::class);
                        $factoryClass = $config->getSystemValue('ldapProviderFactory', null);
-                       if (is_null($factoryClass)) {
+                       if (is_null($factoryClass) || !class_exists($factoryClass)) {
                                return new NullLDAPProviderFactory($this);
                        }
                        /** @var \OCP\LDAP\ILDAPProviderFactory $factory */