Page MenuHomePhorge

D5739.1775203847.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5739.1775203847.diff

diff --git a/src/app/Http/DAV/Auth.php b/src/app/Http/DAV/Auth.php
--- a/src/app/Http/DAV/Auth.php
+++ b/src/app/Http/DAV/Auth.php
@@ -67,6 +67,6 @@
$root = trim(\config('services.dav.webdav_root'), '/') . '/user/';
$path = substr($path, strlen($root));
- return explode('/', $path)[0];
+ return rawurldecode(explode('/', $path)[0]);
}
}
diff --git a/src/tests/Feature/Controller/DAVTest.php b/src/tests/Feature/Controller/DAVTest.php
--- a/src/tests/Feature/Controller/DAVTest.php
+++ b/src/tests/Feature/Controller/DAVTest.php
@@ -612,7 +612,9 @@
[$folders, $files] = $this->initTestStorage($john);
// Test with valid Authorization header
- $response = $this->davRequest('PROPFIND', $root, '<d:propfind xmlns:d="DAV:"><d:allprop/></d:propfind>', $john);
+ // Also make sure that encoded username is working
+ $enc_root = str_replace('@', '%40', $root);
+ $response = $this->davRequest('PROPFIND', $enc_root, '<d:propfind xmlns:d="DAV:"><d:allprop/></d:propfind>', $john);
$response->assertStatus(207);
$doc = $this->responseXML($response);

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 8:10 AM (54 m, 32 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823162
Default Alt Text
D5739.1775203847.diff (1 KB)

Event Timeline