summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-06-27 22:26:43 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-06-27 22:26:43 +0200
commit2a72eff9ee5c337f75e8d0434cd93aada6a38eec (patch)
tree339f14248f7bbfb07de25a6770bccd56d09b4915
parent1710de8afbb1d7acc2025642893da791bd6caefa (diff)
downloadnextcloud-server-2a72eff9ee5c337f75e8d0434cd93aada6a38eec.tar.gz
nextcloud-server-2a72eff9ee5c337f75e8d0434cd93aada6a38eec.zip
Fix getting the certificate bundle for dav external storage (#25274)
* Fix getting the certificate bundle for dav external storages * Log the original exception in dav external storage
-rw-r--r--apps/files_sharing/lib/External/Manager.php2
-rw-r--r--lib/private/Files/Storage/DAV.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php
index e338e6e509c..3f665b0978d 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -328,7 +328,7 @@ class Manager {
public function removeShare($mountPoint) {
$mountPointObj = $this->mountManager->find($mountPoint);
- $id = $mountPointObj->getStorage()->getCache()->getId();
+ $id = $mountPointObj->getStorage()->getCache()->getId('');
$mountPoint = $this->stripPath($mountPoint);
$hash = md5($mountPoint);
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index c8088a41c47..7eb6aa199b1 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -107,7 +107,11 @@ class DAV extends Common {
}
if ($this->secure === true) {
// inject mock for testing
- $certPath = \OC_User::getHome(\OC_User::getUser()) . '/files_external/rootcerts.crt';
+ $certManager = \OC::$server->getCertificateManager();
+ if (is_null($certManager)) { //no user
+ $certManager = \OC::$server->getCertificateManager(null);
+ }
+ $certPath = $certManager->getAbsoluteBundlePath();
if (file_exists($certPath)) {
$this->certPath = $certPath;
}
@@ -812,6 +816,7 @@ class DAV extends Common {
* which might be temporary
*/
private function convertException(Exception $e, $path = '') {
+ \OC::$server->getLogger()->logException($e);
Util::writeLog('files_external', $e->getMessage(), Util::ERROR);
if ($e instanceof ClientHttpException) {
if ($e->getHttpStatus() === Http::STATUS_LOCKED) {