mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #63] Not Found when file name contains HTML escape code #26
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KSXGitHub on GitHub (Jun 21, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/63
Steps to reproduce
dufsto serve the folder that contains the created file.https://localhost:5000/in Google Chrome.abc&def.txtis nowhere to be found. Instead, there isabc&def.txt. Click the file.Expected behavior
abc&def.txtshould appear.abc&def.txt, the texthelloshould appear.Actual behavior
Not Found.Notes
Using Nautilus to access the file via WebDAV (
dav://localhost:5000/) works fine.Additional suggestions
This flaw is probably caused by text being inserted directly to the constructed HTML page without escape, sanitization, or any form of text processing. This is dangerous as it could lead to some form of code injection attack. I am not just referring to this one bug, I am referring to other potential bugs that are similar to this.
Request:
dufs) uses maud to generate its directory page.