Add DOCUMENT_BUILDER_FACTORY_ALLOWING_DOCTYPE to XmlBeansUtil#7561
Merged
labkey-jeckels merged 5 commits intoLabKey:release26.3-SNAPSHOTfrom Apr 9, 2026
Conversation
…rrors the existing SAX_PARSER_FACTORY_ALLOWING_DOCTYPE: permits the DOCTYPE declaration but keeps every other XXE mitigation in place - Extracted a private documentBuilderFactory(boolean allowDocType) helper so both DOM factories share one configuration site, mirroring the existing saxParserFactory(boolean) helper
labkey-jeckels
approved these changes
Apr 8, 2026
…rrors the existing SAX_PARSER_FACTORY_ALLOWING_DOCTYPE: permits the DOCTYPE declaration but keeps every other XXE mitigation in place - Extracted a private documentBuilderFactory(boolean allowDocType) helper so both DOM factories share one configuration site, mirroring the existing saxParserFactory(boolean) helper
…/github.com/vagisha/platform into 26.3_fb_panoramapublic-ncbi-doctype-parsing
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.
Rationale
XmlBeansUtil.DOCUMENT_BUILDER_FACTORYsetsdisallow-doctype-decl=truefor XXE protection, which causes parsers to fail on any XML with a<!DOCTYPE>declaration. This is a problem for the Panorama Public code that parses NCBI'sesummary.fcgiresponse that begins with<!DOCTYPE eSummaryResult PUBLIC ... esummary-v1.dtd>Related Pull Requests
Changes
DOCUMENT_BUILDER_FACTORY_ALLOWING_DOCTYPEtoXmlBeansUtil, mirroring the existingSAX_PARSER_FACTORY_ALLOWING_DOCTYPE. The DOCTYPE declaration is permitted, but every other XXE mitigation stays in place.documentBuilderFactory(boolean allowDocType)helper, mirroring the existingsaxParserFactory(boolean)helper.