Skip to content

fix(workspace): replace XML-invalid characters in rich workspace content - #9590

Merged
mejo- merged 1 commit into
mainfrom
fix/workspace_xml_invalid_chars
Nov 10, 2026
Merged

mejo- merged 1 commit into
mainfrom
fix/workspace_xml_invalid_chars

Conversation

@mejo-

@mejo- mejo- commented Nov 10, 2026

Copy link
Copy Markdown
Member

The rich-workspace DAV properties embed the folder's Readme.md content in the multistatus response as is. Control characters, U+FFFE/U+FFFF or invalid UTF-8 (e.g. a Readme.md left behind encrypted after disabling server-side encryption) make the whole response malformed, so strict clients like the iOS app fail to show the folder listing. NUL bytes also silently truncate the property value.

Decode the content to UTF-8 the same way the editor does and replace characters that cannot be represented in XML 1.0 with U+FFFD.

Fixes: #9511

Assisted-by: ClaudeCode:claude-opus-5-5

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@mejo- mejo- self-assigned this Nov 10, 2026
@mejo- mejo- added bug Something isn't working 3. to review labels Nov 10, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 10, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 10, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Nov 10, 2026
@mejo-

mejo- commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

/backport to stable35

The rich-workspace DAV properties embed the folder's Readme.md content
in the multistatus response as is. Control characters, U+FFFE/U+FFFF or
invalid UTF-8 (e.g. a Readme.md left behind encrypted after disabling
server-side encryption) make the whole response malformed, so strict
clients like the iOS app fail to show the folder listing. NUL bytes also
silently truncate the property value.

Decode the content to UTF-8 the same way the editor does and replace
characters that cannot be represented in XML 1.0 with U+FFFD.

Fixes: #9511

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the fix/workspace_xml_invalid_chars branch from ae4419b to 6d60747 Compare November 10, 2026 17:51
@mejo-
mejo- enabled auto-merge November 10, 2026 17:51
@mejo-
mejo- merged commit 9e1cf78 into main Nov 10, 2026
70 checks passed
@mejo-
mejo- deleted the fix/workspace_xml_invalid_chars branch November 10, 2026 18:04
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Nov 10, 2026
@backportbot

backportbot Bot commented Nov 10, 2026

Copy link
Copy Markdown

The backport to stable35 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable35
git pull origin stable35

# Create the new backport branch
git checkout -b backport/9590/stable35

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 6d60747a

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/9590/stable35

Error: Failed to check for changes with origin/stable35: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@mejo-

mejo- commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Manual backport to stable35: #9592

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug Something isn't working

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

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

3 participants