diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-05-25 19:48:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 19:48:00 +0200 |
commit | a6b0bed5857c9384ca5537a30c633ab832b083e1 (patch) | |
tree | 3a0985d97134172e3ba14fb9caaaf1d811d3fb88 /lib | |
parent | d695bad205d1f9af7c27f9607db54175d9899dc0 (diff) | |
parent | 18b0d753f2d76da10fefbf9a34e22dfdcbdc93b0 (diff) | |
download | nextcloud-server-a6b0bed5857c9384ca5537a30c633ab832b083e1.tar.gz nextcloud-server-a6b0bed5857c9384ca5537a30c633ab832b083e1.zip |
Merge pull request #21090 from nextcloud/bug/noid/do-not-read-cert-from-datadir-by-default
Do not read certificate bundle from data dir by default
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Http/Client/Client.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index af43df6365f..58234d16535 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -97,18 +97,18 @@ class Client implements IClient { } private function getCertBundle(): string { - if ($this->certificateManager->listCertificates() !== []) { - return $this->certificateManager->getAbsoluteBundlePath(); - } - // If the instance is not yet setup we need to use the static path as // $this->certificateManager->getAbsoluteBundlePath() tries to instantiiate // a view - if ($this->config->getSystemValue('installed', false)) { - return $this->certificateManager->getAbsoluteBundlePath(null); + if ($this->config->getSystemValue('installed', false) === false) { + return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; + } + + if ($this->certificateManager->listCertificates() === []) { + return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; } - return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; + return $this->certificateManager->getAbsoluteBundlePath(); } /** |