Skip to content

Add DOCUMENT_BUILDER_FACTORY_ALLOWING_DOCTYPE to XmlBeansUtil#7561

Merged
labkey-jeckels merged 5 commits intoLabKey:release26.3-SNAPSHOTfrom
vagisha:26.3_fb_panoramapublic-ncbi-doctype-parsing
Apr 9, 2026
Merged

Add DOCUMENT_BUILDER_FACTORY_ALLOWING_DOCTYPE to XmlBeansUtil#7561
labkey-jeckels merged 5 commits intoLabKey:release26.3-SNAPSHOTfrom
vagisha:26.3_fb_panoramapublic-ncbi-doctype-parsing

Conversation

@vagisha
Copy link
Copy Markdown
Contributor

@vagisha vagisha commented Apr 8, 2026

Rationale

XmlBeansUtil.DOCUMENT_BUILDER_FACTORY sets disallow-doctype-decl=true for 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's esummary.fcgi response that begins with <!DOCTYPE eSummaryResult PUBLIC ... esummary-v1.dtd>

Related Pull Requests

Changes

  • Added DOCUMENT_BUILDER_FACTORY_ALLOWING_DOCTYPE to XmlBeansUtil, mirroring the existing SAX_PARSER_FACTORY_ALLOWING_DOCTYPE. The DOCTYPE declaration is permitted, but every other XXE mitigation stays in place.
  • Extracted a private documentBuilderFactory(boolean allowDocType) helper, mirroring the existing saxParserFactory(boolean) helper.

vagisha added 2 commits April 7, 2026 18:35
…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
vagisha added 3 commits April 8, 2026 15:15
…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 labkey-jeckels merged commit a5c7322 into LabKey:release26.3-SNAPSHOT Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants