Repository navigation
MLE-33478: Fix DOCTYPE handling in DOMHandle - #1997
Merged
Merged
Conversation
ashokrprogress
requested review from
NiteshMehta,
adganta,
hmadala001,
prgs-rsingh,
rjrudin and
vishwach
as code owners
December 1, 2026 06:44
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the DOMHandle DOCTYPE-handling fix.
No open issues 🎉
What changed in this PR
Fixes DOCTYPE handling in DOMHandle by configuring the XML-reading LSParser directly, closing a gap in the existing parser protections.
Changes:
- Reject DOCTYPE declarations even when a resource resolver is configured.
- Document parsing behavior and stream closure.
- Add regression tests for buffer rejection and resolver-configured stream rejection, including stream closure.
| File | Description |
|---|---|
marklogic-client-api/src/test/java/com/marklogic/client/test/ClosingHandlesTest.java |
Tests DOCTYPE rejection and stream closure on rejection. |
marklogic-client-api/src/main/java/com/marklogic/client/io/DOMHandle.java |
Enables DOCTYPE rejection on LSParser and documents the parsing contract. |
Review effort: Balanced
Reject DOCTYPE declarations on the LSParser used to read XML, closing the gap where DocumentBuilderFactory protections did not apply. Add regression tests for buffer parsing and resolver-configured stream parsing, including stream closure on rejection.
NiteshMehta
force-pushed
the
MLE-33478
branch
from
December 1, 2026 13:31
7dc0a90 to
30cdcc7
Compare
NiteshMehta
approved these changes
Dec 1, 2026
vishwach
approved these changes
Dec 2, 2026
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.
MLE-33478
Reject DOCTYPE declarations on the LSParser used to read XML, closing the gap where DocumentBuilderFactory protections did not apply.
Add regression tests for buffer parsing and resolver-configured stream parsing, including stream closure on rejection.