Federico Mariani created CAMEL-26976:
----------------------------------------
Summary: camel-xslt: transformerFactoryConfigurationStrategy
ignored for the default factory, secureProcessing ignored with a
saxonConfiguration bean
Key: CAMEL-26976
URL: https://issues.apache.org/jira/browse/CAMEL-26976
Project: Camel
Issue Type: Bug
Components: camel-xslt
Affects Versions: 4.18.5, 4.23.0, 4.22.2
Reporter: Federico Mariani
Fix For: 4.24.0, 4.22.3
Follow-up of CAMEL-24108: two cases where the endpoint does not apply its
factory settings.
* {{xslt}}: {{transformerFactoryConfigurationStrategy}} (endpoint or component)
is never called when no {{transformerFactory}}, {{transformerFactoryClass}} or
{{xpathTotalOpLimit}} is set, because the default {{TransformerFactory}} is
then created later by {{XsltBuilder}}.
* {{xslt-saxon}}: with a {{saxonConfiguration}} bean, {{secureProcessing}}
(default {{true}}) is not applied: the bean replaces the factory's
{{Configuration}} after the feature was set, so a stylesheet with
{{xsl:result-document}} or extension functions runs as with
{{secureProcessing=false}}.
{code:java}
from("direct:a").to("xslt:transform.xsl?transformerFactoryConfigurationStrategy=#myStrategy");
// myStrategy is not called
from("direct:b").to("xslt-saxon:result-document.xsl?saxonConfiguration=#cfg");
// cfg = new net.sf.saxon.Configuration(): the route starts and the result
document is written
{code}
Expected: the strategy runs on the default factory too, and
{{secureProcessing}} is applied on top of the {{saxonConfiguration}} bean
(explicit {{saxonConfigurationProperties}} still win). The {{xslt-saxon}} case
comes from CAMEL-24108 (4.22.0), which sets the feature before the bean is
registered; before, it was set after it when {{saxonExtensionFunctions}} were
configured.
_Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)