Repository navigation
fix(azure): Clear libxml errors after parsing error responses - #2725
Open
DerDreschner wants to merge 1 commit into
Open
DerDreschner wants to merge 1 commit into
DerDreschner wants to merge 1 commit into
Conversation
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>
Member
Author
|
/backport to stable35 |
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
Member
Author
|
/backport to stable31 |
Member
Author
|
Backport to stable32 down to stable29 is necessary to avoid broken CI runs there... |
DerDreschner
requested review from
icewind1991,
juliusknorr and
leftybournes
November 18, 2026 14:21
Member
Author
|
/backport to stable30 |
Member
Author
|
/backport to stable29 |
Contributor
|
(btw for master I plan to remove it: #2686 ) |
Member
Author
Do you plan to backport it in any way? Or should I target stable35 downwards instead with this patch? |
Contributor
|
No only master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Patches
microsoft/azure-storage-commonso thatServiceExceptionclears the libxml errors it causes and restores the previouslibxml_use_internal_errors()setting.With newer libxml2 (e.g. 2.15 on Ubuntu 26.04, Alpine 3.21+), the empty body of a 404 response to a HEAD or GET request leaves "Document is empty" in the libxml error buffer. sabre/xml reads that buffer after parsing. Every later parse in the same request or CLI process then throws a
LibXMLException, e.g. for WebDAV storages and federated shares. It's also why the Azure object storage tests in server fail on the newer CI runners.Example runs that fail:
The SDK is archived upstream, so it can only be fixed with a patch. Upstream report: Azure/azure-storage-common-php#9
AI