You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull request #1250 changed the WebDAV server to have it escape all HTML4 entities, but some of them seem to cause issues for certain WebDAV clients.
Reproduction
Create a file containing the character +.
Start the WebDAV server, e.g. ./mega-exec webdav /
Attempt to list the directory using an affected tool. I tested cadaver and rclone, which did have the issue. Firefox accessing the folder did not exhibit the issue.
When listing the directory with cadaver, the following error occurs:
XML parse error at line 56: undefined entity
When listing the directory with rclone, with the command rclone lsi mega-webdav: (where mega-webdav is the name I gave to the remote), the following error occurs:
error listing: couldn't list files: XML syntax error on line 56: invalid character entity &add;
Solution
Indeed, if we look at the source code for cadaver, we see that it uses the Expat XML parser, which does not appear to implement the HTML4 entities. It does, however, support specifying characters by number. Thus, I was able to make it work with cadaver and rclone like so:
Pull request #1250 changed the WebDAV server to have it escape all HTML4 entities, but some of them seem to cause issues for certain WebDAV clients.
Reproduction
+
../mega-exec webdav /
When listing the directory with cadaver, the following error occurs:
When listing the directory with rclone, with the command
rclone lsi mega-webdav:
(wheremega-webdav
is the name I gave to the remote), the following error occurs:Solution
Indeed, if we look at the source code for cadaver, we see that it uses the Expat XML parser, which does not appear to implement the HTML4 entities. It does, however, support specifying characters by number. Thus, I was able to make it work with cadaver and rclone like so:
src/utils.cpp
The text was updated successfully, but these errors were encountered: