Andrea Cosentino created CAMEL-24292:
----------------------------------------
Summary: camel-sql, camel-sql-stored and camel-xslt: add opt-in
gate for override headers for parity with sibling components
Key: CAMEL-24292
URL: https://issues.apache.org/jira/browse/CAMEL-24292
Project: Camel
Issue Type: Improvement
Components: camel-sql, camel-xslt
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
Components that let a message header override the endpoint-configured
template/query expose an explicit opt-in flag (allowTemplateFromHeader /
allowControlHeaders, default false). A few read their override header
unconditionally:
- camel-sql: SqlProducer reads CamelSqlQuery ungated -> add
allowQueryFromHeader on DefaultSqlEndpoint.
- camel-sql-stored: SqlStoredProducer reads CamelSqlStoredTemplate ungated; the
value additionally flows through SqlHelper.resolveQuery -> ResourceHelper
(which resolves file:/http: schemes) -> add a gate and use placeholder-only
resolution on header-derived input.
- camel-xslt: FileResultHandlerFactory reads CamelXsltFileName ungated, while
CamelXsltResourceUri/Stylesheet are gated by allowTemplateFromHeader -> gate
consistently.
Note: gating a currently-honoured header (especially CamelSqlQuery) is a
behavioural change -> needs an upgrade-guide entry and PMC input on the
default. Filed for discussion.
_Filed by Claude Code on behalf of Andrea Cosentino._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)