Skip to content

Document location restrictions on Log4j 1 external entities - #4265

Open
ppkarwasz wants to merge 2 commits into
fix/2.x/xml-parser-docsfrom
fix/2.x/xml-entity-restrictions-docs
Open

Document location restrictions on Log4j 1 external entities#4265
ppkarwasz wants to merge 2 commits into
fix/2.x/xml-parser-docsfrom
fix/2.x/xml-entity-restrictions-docs

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Stacked on #4264; only the last commit belongs to this PR.

Documents the behavior introduced by #4198, which first ships in 2.27.0: the external subset and other external entities in Log4j 1 XML configuration files are resolved through ConfigurationSource, so they can only be retrieved from locations allowed by the log4j2.configurationAllowedProtocols property. Adds a note to the migration guide and a paragraph to the Javadoc of the bridge XmlConfiguration.

Kept separate from #4264 so that the documentation of unreleased behavior can be merged (or held back) independently. After #4264 merges, the base can be retargeted to 2.x.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LNsw2hhNuJ6tjsEU2tChnn

Since version 2.27.0 (#4198), the external subset and other external
entities in Log4j 1 XML configuration files are resolved through
`ConfigurationSource`, so they can only be retrieved from locations
allowed by the `log4j2.configurationAllowedProtocols` property.
Document this in the migration guide and in the Javadoc of the bridge
`XmlConfiguration`.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LNsw2hhNuJ6tjsEU2tChnn
@ppkarwasz
ppkarwasz force-pushed the fix/2.x/xml-entity-restrictions-docs branch from 4d7131e to ceaeeb4 Compare August 30, 2026 15:16

@ramanathan1504 ramanathan1504 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppkarwasz Changelog is missing

Comment thread log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java Outdated
Comment thread src/site/antora/modules/ROOT/pages/migrate-from-log4j1.adoc Outdated
Co-authored-by: Ramanathan <ramanathanbscmca@gmail.com>
@ppkarwasz

Copy link
Copy Markdown
Member Author

Changelog is missing

This is documentation only, so I wouldn't add any changelog. For me a changelog is necessary, so users can rapidly find a change that might have broken their application. In this case, no code changes are present.

@ramanathan1504

Copy link
Copy Markdown
Contributor

Changelog is missing

This is documentation only, so I wouldn't add any changelog. For me a changelog is necessary, so users can rapidly find a change that might have broken their application. In this case, no code changes are present.

ok understood👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants