XML-invalid characters break rich-workspace xml parsers in iOS client
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by reproducing with the curl PROPFIND in the issue and piping the response to xmllint; the nc:rich-workspace property is where the raw Readme.md content lands unescaped. Find where the text app's rich-workspace property value is read and serialized into the DAV response, then check the linked fix branch in alpsayin/nextcloud-app-text for how it strips XML 1.0-invalid control characters. Done when the response body is well-formed XML and the directory listing shows again with the bad Readme.md present.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 https://github.com/nextcloud/ios/issues/4041 .
iOS side should probably not fall on its face entirely upon failing to parse the said XML but that can be tracked on https://github.com/nextcloud/ios/issues/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:
- Grab the attachment from https://github.com/nextcloud/ios/issues/4041#issuecomment-6574651262 put it into an account's as
Templates/Readme.md. Don't leave thetxtextension. - Refresh the top level directory listing in iOS app.
- See the listing momentarily show and disappear until the Readme.md is removed.
- Or without the iOS app (the request is a reduced version of what the iOS app sends):
With the corrupted Readme.md present, the server answers HTTP 207 but the body is not well-formed: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 --: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
- Top level listing to show.
Screenshots
Somewhat applicable but it's just be a screenshot of no folders and files vs. a proper listing.
Server details:
- Nextcloud version: 33.0.10 (Text app 7.0.1). Also reported on NC31/NC32 and on NC34.0.4 (AIO) in nextcloud/ios#4041
- PHP Version: 8.3 (php-fpm, Apache 2.4.58)
- Database: MariaDB 10.11.14
Client details:
- OS: iOS 26.x
- Browser: N/A, Nextcloud iOS app 35.2.2.0. Web, desktop and Android clients are not affected.
- Browser version: N/A
- Device: iPhone 12 mini. Also reported on other iPhones and iPad in nextcloud/ios#4041
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.
- Lingua principale
- JavaScript
- Stelle
- 665
- Fork
- 133
- Merge medio
- 1g 9h
- PR unite (30g)
- 180
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextcloud/text
-
0. Needs triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
nextcloud/text#9482 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Lazy image loading never defers: IntersectionObserver runs before the placeholder is sizedForse già presa @max-nextcloud l’ha presa 2 giorni fa. Aperta1. to develop bug feature: images performance 🚀 skill: frontend ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
nextcloud/text#9438 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
folder description not shows when using folder tree to navigateForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug feature: folder description
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Text editor fails to open documents containing a link with a purely numeric href (`href?.startsWith is not a function`)Forse già presa @upskaling l’ha presa oggi. Aperta0. Needs triage bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
0. Needs triage needs discussion needs info
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
nextcloud/text#9509 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextcloud/text
Issue simili
-
clientV2: Application Info header separators show as missing-character boxes without a CJK fontApertabug new-client
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
NUWCDIVNPT/stig-manager#2285 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Fei2411/DeepSeek-Bot#922 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
DuarteSantos8/openGym#998 ·
I maintainer di solito rispondono entro 4 giorni
-
server errored
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
OpenTermsArchive/contrib-declarations#4273 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni