[GH-ISSUE #19] bug: filenames aren't properly escaped in WebDAV PROPFIND #12

Closed
opened 2026-04-08 16:49:47 +03:00 by zhus · 3 comments
Owner

Originally created by @jkoop on GitHub (Jun 5, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/19

To reproduce the issue, create a folder with a file called This & that. Try to mount the folder via WebDAV. See it fail (possibly with an XML parse error).

Excerpts from the PROPFIND response from duf and apache2:

<!-- duf -->
<D:href>/path/to/This & that</D:href>
<D:displayname>This & that</D:displayname>
<!-- apache2 -->
<D:href>/path/to/This%20&amp;%20that</D:href>
Originally created by @jkoop on GitHub (Jun 5, 2022). Original GitHub issue: https://github.com/sigoden/dufs/issues/19 To reproduce the issue, create a folder with a file called `This & that`. Try to mount the folder via WebDAV. See it fail (possibly with an XML parse error). Excerpts from the PROPFIND response from `duf` and `apache2`: ```xml <!-- duf --> <D:href>/path/to/This & that</D:href> <D:displayname>This & that</D:displayname> ``` ```xml <!-- apache2 --> <D:href>/path/to/This%20&amp;%20that</D:href> ```
zhus closed this issue 2026-04-08 16:49:47 +03:00
Author
Owner

@jkoop commented on GitHub (Jun 5, 2022):

Fixed by PR 20

<!-- gh-comment-id:1146880612 --> @jkoop commented on GitHub (Jun 5, 2022): Fixed by PR 20
Author
Owner

@jkoop commented on GitHub (Jun 6, 2022):

@sigoden's fix didn't fix this issue. But at least the XML parses now

image

<!-- gh-comment-id:1146904664 --> @jkoop commented on GitHub (Jun 6, 2022): @sigoden's fix didn't fix this issue. But at least the XML parses now ![image](https://user-images.githubusercontent.com/36482619/172074733-0ea7bac7-f571-4ffe-9c1c-2da4eb2991a8.png)
Author
Owner

@sigoden commented on GitHub (Jun 6, 2022):

image

I have tested it on windows dav. It works. @jkoop

<!-- gh-comment-id:1146906962 --> @sigoden commented on GitHub (Jun 6, 2022): ![image](https://user-images.githubusercontent.com/4012553/172075118-05faab69-5a5d-44a2-a6fa-e91b0cc9ead3.png) I have tested it on windows dav. It works. @jkoop
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#12