Skip to content

Commit 4eee160

Browse files
authored
Merge pull request #53729 from nextcloud/dav-external-url-encoded-root
2 parents 04c64fa + 6d0119b commit 4eee160

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/Files/Storage/DAV.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function __construct(array $parameters) {
116116
// inject mock for testing
117117
$this->certManager = \OC::$server->getCertificateManager();
118118
}
119-
$this->root = $parameters['root'] ?? '/';
119+
$this->root = rawurldecode($parameters['root'] ?? '/');
120120
$this->root = '/' . ltrim($this->root, '/');
121121
$this->root = rtrim($this->root, '/') . '/';
122122
} else {
@@ -191,7 +191,7 @@ public function createBaseUri(): string {
191191
if ($this->secure) {
192192
$baseUri .= 's';
193193
}
194-
$baseUri .= '://' . $this->host . $this->root;
194+
$baseUri .= '://' . $this->host . $this->encodePath($this->root);
195195
return $baseUri;
196196
}
197197

0 commit comments

Comments
 (0)