Skip to content

Ensure consistent XML parser config#605

Merged
labkey-jeckels merged 1 commit intodevelopfrom
fb_xmlConfig
Feb 20, 2026
Merged

Ensure consistent XML parser config#605
labkey-jeckels merged 1 commit intodevelopfrom
fb_xmlConfig

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

Rationale

We want to be using our centrally defined XML parser configuration

Related Pull Requests

Changes

  • Use preconfigured XML factories

@labkey-jeckels labkey-jeckels requested review from a team and vagisha February 20, 2026 02:48
@labkey-jeckels labkey-jeckels self-assigned this Feb 20, 2026
@labkey-jeckels labkey-jeckels merged commit f197719 into develop Feb 20, 2026
7 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_xmlConfig branch February 20, 2026 17:48
labkey-jeckels pushed a commit to LabKey/platform that referenced this pull request Apr 9, 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
- LabKey/MacCossLabModules#605
- LabKey/MacCossLabModules#623

#### 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.
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