diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index afd8f87e2de4b..2d166b5438da1 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -116,7 +116,7 @@ public function __construct(array $parameters) { // inject mock for testing $this->certManager = \OC::$server->getCertificateManager(); } - $this->root = $parameters['root'] ?? '/'; + $this->root = rawurldecode($parameters['root'] ?? '/'); $this->root = '/' . ltrim($this->root, '/'); $this->root = rtrim($this->root, '/') . '/'; } else { @@ -191,7 +191,7 @@ public function createBaseUri(): string { if ($this->secure) { $baseUri .= 's'; } - $baseUri .= '://' . $this->host . $this->root; + $baseUri .= '://' . $this->host . $this->encodePath($this->root); return $baseUri; }