summaryrefslogtreecommitdiffstats
path: root/lib/private/http/client
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-13 10:29:36 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-13 10:29:36 +0100
commit4129480eb0a91bf53785ad38c6527def3ae0f1f8 (patch)
tree508ea1bdc31250e7c2ea39e491f56d569ecb9035 /lib/private/http/client
parente22186d234dbe359b8fc9035b509a62112ffbc9d (diff)
parent28049b510b4500cd56625d5931a1c431f09253c2 (diff)
downloadnextcloud-server-4129480eb0a91bf53785ad38c6527def3ae0f1f8.tar.gz
nextcloud-server-4129480eb0a91bf53785ad38c6527def3ae0f1f8.zip
Merge pull request #21671 from owncloud/fix-setup-on-master
Use legacy method when ownCloud is not yet installed
Diffstat (limited to 'lib/private/http/client')
-rw-r--r--lib/private/http/client/client.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/http/client/client.php b/lib/private/http/client/client.php
index 8cadeda0efd..bd9e82ddae7 100644
--- a/lib/private/http/client/client.php
+++ b/lib/private/http/client/client.php
@@ -62,7 +62,14 @@ class Client implements IClient {
if ($this->certificateManager->listCertificates() !== []) {
$this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath());
} else {
- $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null));
+ // 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)) {
+ $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null));
+ } else {
+ $this->client->setDefaultOption('verify', \OC::$SERVERROOT . '/resources/config/ca-bundle.crt');
+ }
}
$this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler');