iterate-ch / cyberduck

Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.
https://cyberduck.io/
GNU General Public License v3.0
3.33k stars 290 forks source link

Decode HTML entities in WebDAV #15539

Open AliveDevil opened 9 months ago

AliveDevil commented 9 months ago

Some web dav implementations (currently known: Mega#2599) encode XML special characters using HTML entities, instead of percent encoding these.

We could either state that services returning invalid XML entities aren't supported, or implement the EntityResolver API, to add support for this - which would import all of Chromium/blink/html_entity_names.csv.

Failing log output:

ch.cyberduck.core.dav.SaxPropFindResponseHandler - Fatal parser error org.xml.sax.SAXParseException; lineNumber: 20; columnNumber: 32; The entity "add" was referenced, but not declared.
AliveDevil commented 9 months ago

i.e.

<d:displayname>C&add;&add;</d:displayname>