Reject embedded NUL in SimpleXMLElement path/URL constructor - #216
Closed
iliaal wants to merge 6 commits into
Closed
Reject embedded NUL in SimpleXMLElement path/URL constructor#216iliaal wants to merge 6 commits into
iliaal wants to merge 6 commits into
Conversation
* PHP-8.2: Fix hMailServer URL in Windows CI (php#23055)
* PHP-8.3: Fix hMailServer URL in Windows CI (php#23055)
The id must be reset to NULL before calling code that can invoke userland code, as the id remains visible after release due to a stale pointer. Closes phpGH-23046.
iliaal
force-pushed
the
fix/sxe-ctor-nul-path
branch
from
August 5, 2026 13:27
8bdabfd to
49c4d81
Compare
When dataIsURL is true, __construct parsed the path as a plain string and passed it to xmlReadFile, so an embedded NUL truncated the path. simplexml_load_file already rejects NULs via the path parameter type. Match that check before xmlReadFile. Closes phpGH-23069
iliaal
force-pushed
the
fix/sxe-ctor-nul-path
branch
from
August 5, 2026 13:28
49c4d81 to
3f8efc2
Compare
Owner
Author
|
Promoted upstream as php#23069. |
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.
When dataIsURL is true, SimpleXMLElement::__construct parsed the path as a plain string and passed it to xmlReadFile, so an embedded NUL truncated the path. simplexml_load_file already rejects NULs; match that check before xmlReadFile.