Skip to content

XML-invalid characters break rich-workspace xml parsers in iOS client #9511

Closed

Description

@alpsayin

Describe the bug
XML-1.0-invalid characters from a Readme.md file are directly put into the response of an rich-workspace request. Which then makes its way into iOS app and breaks its parser. It then stops listing the directory entirely nextcloud/ios#4041 .
iOS side should probably not fall on its face entirely upon failing to parse the said XML but that can be tracked on nextcloud/ios#4041 while this issue focuses on the serverside.

A server side fix proposal is at https://github.com/alpsayin/nextcloud-app-text/tree/fix/rich-workspace-invalid-xml-chars . It's AI authored, and I've seen and reviewed the code (there's a "BUT", carry on reading).
It has been tested on my own NC33 and some of the unit tests but I lack the infrastructure to run the suite asked by the contribution guidelines. As much as I'm a software engineer, I'm an embedded FW engineer who also lacks PHP and Nextcloud knowledge so I refrain from raising a PR myself.

To Reproduce
Steps to reproduce the behavior:

  1. Grab the attachment from No files here error with nextcloud app 33 ios#4041 (comment) put it into an account's as Templates/Readme.md . Don't leave the txt extension.
  2. Refresh the top level directory listing in iOS app.
  3. See the listing momentarily show and disappear until the Readme.md is removed.
  4. Or without the iOS app (the request is a reduced version of what the iOS app sends):
    curl -s -u <user>:<app-password> -X PROPFIND -H 'Depth: 1' -H 'Content-Type: application/xml' \
      --data '<?xml version="1.0"?><d:propfind xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns"><d:prop><d:displayname/><nc:rich-workspace/></d:prop></d:propfind>' \
      https://<server>/remote.php/dav/files/<user>/ | xmllint --noout -
    With the corrupted Readme.md present, the server answers HTTP 207 but the body is not well-formed:
    -:14: parser error : PCDATA invalid Char value 22
    -:14: parser error : PCDATA invalid Char value 28
    -:14: parser error : PCDATA invalid Char value 16
    

Expected behavior

  1. Top level listing to show.

Screenshots
Somewhat applicable but it's just be a screenshot of no folders and files vs. a proper listing.

| Image Image

Server details:

Client details:

Logs

Nextcloud log (data/nextcloud.log)

Nothing relevant is logged, even at loglevel 0 (debug). Over the hours when the iOS Files tab was empty, nextcloud.log has ~4,400 entries from the iOS app, all routine debug noise (IServerContainer deprecation, config lexicon notices, preview cache misses). There are no errors, nothing from the text app, and nothing about rich-workspace or XML. The server answers the PROPFIND with HTTP 207. The problem is only visible in the response body, which is malformed XML because the raw Readme.md content inside <nc:rich-workspace> contains bytes 0x10/0x16/0x1c

Browser log

Not applicable: iOS app (Nextcloud iOS 35.2.2.0). The iOS app's own debug log showed nothing either; the request "succeeds" and the listing is simply empty.

Activity

  1. added theissue type on Nov 2, 2026
  2. changed the title [-]XML-invalid characters break rick-workspace xml parsers in iOS client[/-] [+]XML-invalid characters break rich-workspace xml parsers in iOS client[/+] on Nov 2, 2026
  3. self-assigned this
    on Nov 10, 2026
  4. moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity teamon Nov 10, 2026
  5. moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Productivity teamon Nov 10, 2026
  6. added a commit that references this issue on Nov 10, 2026
    6d60747
  7. moved this from 🏗️ In progress to ☑️ Done in 📝 Productivity teamon Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions