CAMEL-24605: align FopProducer XML transformation with Camel's standard secure XML processing configuration - #26108
Open
oscerd wants to merge 1 commit into
Open
CAMEL-24605: align FopProducer XML transformation with Camel's standard secure XML processing configuration#26108oscerd wants to merge 1 commit into
oscerd wants to merge 1 commit into
Conversation
…rd secure XML processing configuration Configure the TransformerFactory used by FopProducer to disallow access to external DTDs and stylesheets (ACCESS_EXTERNAL_DTD / ACCESS_EXTERNAL_STYLESHEET), matching the standard secure XML processing configuration used elsewhere in Camel (e.g. XmlConverter). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
davsclaus
approved these changes
Sep 4, 2026
Contributor
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 9 tested, 27 compile-only — current: 9 all testedMaveniverse Scalpel detected 36 affected modules (current approach: 9).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
FopProducerbuilds ajavax.xml.transform.TransformerFactorythat only enablesFEATURE_SECURE_PROCESSINGbefore transforming the incoming message body.Camel's standard XML processing utilities (for example
org.apache.camel.converter.jaxp.XmlConverter) configure the factory more completely by also restricting access to external resources viaXMLConstants.ACCESS_EXTERNAL_DTDandXMLConstants.ACCESS_EXTERNAL_STYLESHEET(set to an empty string).For consistency and robustness across the codebase, this change applies the same standard configuration when
FopProducercreates itsTransformerFactory.Changes
FopProducernow setsACCESS_EXTERNAL_DTDandACCESS_EXTERNAL_STYLESHEETto an empty string on theTransformerFactory(defensively guarded, matching the pattern inXmlConverter).FopExternalEntityTestverifying that external DTD/stylesheet access is not resolved during transformation.Testing
mvn test -Dtest=FopExternalEntityTest,FopComponentTestincomponents/camel-fop— all green.Claude Code on behalf of oscerd
🤖 Generated with Claude Code