ppkarwasz opened a new pull request, #4158:
URL: https://github.com/apache/logging-log4j2/pull/4158

   This PR makes XInclude processing in XML configurations **opt-in**: it is 
disabled by default and enabled with the 
`log4j2.configurationEnableXInclude`property.
   
   > [!NOTE]
   > Stacked on #4155 (`fix/2.x/xinclude-fixup-attributes`), which is the base 
of this PR, so the diff shown here is only the opt-in change.
   > Please review/merge that one first.
   
   ## Behavior
   
   - `XmlConfiguration` reads `log4j2.configurationEnableXInclude` in its 
constructor and configures the `DocumentBuilder` accordingly. XInclude is no 
longer always on, and the previous LOG4J2-1127 "retry without XInclude" 
fallback is removed.
   - When XInclude is disabled (the default), `xi:include` elements are left 
unexpanded and ignored, so a configuration that relied on them falls back to 
the default setup.
   
   ## Documentation
   
   - The new property is documented alongside the other configuration-factory 
system properties
   - The XInclude section of the manual notes that it is now opt-in.
   
   ## Tests
   
   - `ConfigurationFactoryTest.xinclude` enables the property, and 
`testGetConfigurationWithMultipleUris` no longer incidentally loads an XInclude 
file.
   - A new `ConfigurationFactoryUnitTest` loads the same logical configuration 
as XML, JSON, YAML, Java properties, an XInclude-composed file (with the 
property enabled) and a cross-format (XML + YAML) composite, asserting through 
the `Configuration` interface that each yields the same components. It also 
covers the XInclude-disabled fallback to the default configuration.
   
   ## Checklist
   
   * [x] Based on `2.x` (stacked on #4155)
   * [ ] `./mvnw verify` succeeds (only the affected modules were tested 
locally)
   * [x] Changelog entry in `src/changelog/.2.x.x`
   * [x] Tests provided
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to