Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117755629
D5739.1775203847.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5739.1775203847.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5739: WebDAV: Fix authentication when username in URL is encoded (%40 instead of @)
Attached
Detach File
Event Timeline