Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-05-25 20:48:00 +0300
committerGitHub <noreply@github.com>2020-05-25 20:48:00 +0300
commita6b0bed5857c9384ca5537a30c633ab832b083e1 (patch)
tree3a0985d97134172e3ba14fb9caaaf1d811d3fb88 /lib
parentd695bad205d1f9af7c27f9607db54175d9899dc0 (diff)
parent18b0d753f2d76da10fefbf9a34e22dfdcbdc93b0 (diff)
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.php14
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();
}
/**