Skip to content

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

Merged
nickvergessen merged 2 commits into
stable29from
backport/2731/stable29
Nov 19, 2026
Merged

nickvergessen merged 2 commits into
stable29from
backport/2731/stable29

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Backport of #2731

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

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

@backportbot
backportbot Bot requested a review from DerDreschner November 19, 2026 09:18
@DerDreschner DerDreschner changed the title [stable29] [stable30] fix(azure): clear libxml errors after parsing error responses [stable29] fix(azure): clear libxml errors after parsing error responses Nov 19, 2026
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>
@DerDreschner
DerDreschner force-pushed the backport/2731/stable29 branch from 878061f to ea67570 Compare November 19, 2026 09:19
@DerDreschner
DerDreschner marked this pull request as ready for review November 19, 2026 09:19
@nickvergessen

Copy link
Copy Markdown
Member

/server-pr

@nextcloud-command

Copy link
Copy Markdown
Contributor

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
nickvergessen merged commit c98dcce into stable29 Nov 19, 2026
8 checks passed
@nickvergessen
nickvergessen deleted the backport/2731/stable29 branch November 19, 2026 11:33
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