Skip to content

[stable33] fix(azure): clear libxml errors after parsing error responses - #2728

Merged
nickvergessen merged 1 commit into
stable33from
backport/2727/stable33
Nov 19, 2026
Merged

nickvergessen merged 1 commit into
stable33from
backport/2727/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 19, 2026

Copy link
Copy Markdown

Backport of PR #2727

ServiceException::parseErrorMessage() enables libxml's internal errors,
but only restores the previous setting when the body parses, and never
clears the errors. Newer libxml2 versions (e.g. 2.15 on Ubuntu 26.04)
record "Document is empty" for the empty body of a 404 response to a
HEAD or GET request, so that error stays in the buffer.

sabre/xml reads the buffer after parsing, so every later parse in the
same request or CLI process failed with a LibXMLException, even for
valid XML such as the PROPFIND response of a WebDAV storage or a
federated share.

The upstream repository is archived, so the fix is applied as a patch.
Upstream report: Azure/azure-storage-common-php#9

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@backportbot
backportbot Bot requested a review from DerDreschner November 19, 2026 09:09
@backportbot backportbot Bot added this to the Nextcloud 33.0.12 milestone Nov 19, 2026
@DerDreschner DerDreschner changed the title [stable33] [stable34] fix(azure): clear libxml errors after parsing error responses [stable33] fix(azure): clear libxml errors after parsing error responses Nov 19, 2026
@nickvergessen

Copy link
Copy Markdown
Member

/server-pr

@nextcloud-command

Copy link
Copy Markdown
Contributor

@nickvergessen
nickvergessen merged commit ba38ad3 into stable33 Nov 19, 2026
9 of 10 checks passed
@nickvergessen
nickvergessen deleted the backport/2727/stable33 branch November 19, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants