Document XML parser features and clarify Log4j 1 bridge properties - #4264
Document XML parser features and clarify Log4j 1 bridge properties#4264ppkarwasz wants to merge 4 commits into
Conversation
- Explain that external XML entities are enabled when parsing Log4j 1 configuration files, but not Log4j 2 ones, and how to migrate configurations that rely on them (inline the entities or use XInclude). - Document the validation difference between the formats (DTD vs XML Schema) and link the threat model next to each capability statement. - State the Log4j 2 XML parser features (no external DTD/entity retrieval, XInclude enabled when available) at the top of the XML format page. - Make the `log4j.configuration` and `log4j1.compatibility` property entries self-contained, so neither can be misread as depending on the other when deep-linked. - Improve the class Javadoc of both `XmlConfiguration` classes and correct their `XXE_DOCUMENT` suppression justifications. - User-visible: the `DOMConfigurator`/`PropertyConfigurator` warning messages now link to `logging.apache.org` instead of `logging.staged.apache.org`. Closes #4263 Assisted-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LNsw2hhNuJ6tjsEU2tChnn
7c88d31 to
7b6c206
Compare
ramanathan1504
left a comment
There was a problem hiding this comment.
log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java:155 (question, no fence)
Cannot be a suggestion: the remaining occurrence is in a different file, outside every hunk.
grep -rn logging.staged.apache.org over the repo leaves one more after this PR — src/site/antora/modules/ROOT/pages/faq.adoc:324 — worth sweeping it in the same commit?
Co-authored-by: Ramanathan <ramanathan@apache.org>
|
@ppkarwasz |
|
The warning is more of a debugging tool: both Application developers usually don't need help with that. Those that were relying on it, will enable debug status logging and see the link to the correct documentation. I don't think a changelog entry is necessary for correcting a typo in a warning message. |
|
@ppkarwasz |
|
Same as in #4265: the only changes in code are to some compile-time annotations, which are not used at runtime. |
This is a documentation-only improvement prompted by a report on the security mailing list (see #4263 for context):
log4j.configurationandlog4j1.compatibilityproperty entries self-contained, so neither can be misread as depending on the other when deep-linked.log4j.configurationmaps toLOG4J_CONFIGURATION(notLOG4J_CONFIGURATION_FILE, which maps tolog4j.configurationFile) andlog4j1.compatibilitymaps toLOG4J_1_COMPATIBILITY(notLOG4J_COMPATIBILITY); both verified againstPropertiesUtil.XmlConfigurationclasses, corrects theirXXE_DOCUMENTsuppression justifications, and bumps theorg.apache.log4j.xmlandorg.apache.logging.log4j.core.config.xmlpackage versions by a micro version accordingly.User-visible change: the
DOMConfigurator/PropertyConfiguratorwarning messages now link tologging.apache.orginstead oflogging.staged.apache.org(staging link shipped since2.24.0).Documentation for behavior that first ships in
2.27.0(#4198) is deliberately excluded; it follows in a separate stacked PR (#4265).Closes #4263
🤖 Generated with Claude Code
https://claude.ai/code/session_01LNsw2hhNuJ6tjsEU2tChnn