[
https://issues.apache.org/jira/browse/CAMEL-24419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Cosentino updated CAMEL-24419:
-------------------------------------
Fix Version/s: 4.18.5
Backported to 25568-to-camel-4.18.x via
https://github.com/apache/camel/pull/25766 (commit e25a4963).
_Claude Code on behalf of Andrea Cosentino_
> camel-mail - MimeMultipartDataFormat unmarshal does not filter the
> mail.smtp/mail.smtps header namespace
> --------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24419
> URL: https://issues.apache.org/jira/browse/CAMEL-24419
> Project: Camel
> Issue Type: Bug
> Components: camel-mail
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0, 4.18.5
>
>
> CAMEL-23522 extended MailHeaderFilterStrategy so that the inbound path also
> filters the mail.smtp. and mail.smtps. prefixes, not just Camel*/camel*:
> String[] inFilter = Arrays.copyOf(CAMEL_FILTER_STARTS_WITH,
> CAMEL_FILTER_STARTS_WITH.length + 2);
> inFilter[CAMEL_FILTER_STARTS_WITH.length] = "mail.smtp.";
> inFilter[CAMEL_FILTER_STARTS_WITH.length + 1] = "mail.smtps.";
> setInFilterStartsWith(inFilter);
> MimeMultipartDataFormat, which CAMEL-23891 gave a header filter for the
> Camel* namespace, still holds a plain DefaultHeaderFilterStrategy:
> private final HeaderFilterStrategy headerFilterStrategy = new
> DefaultHeaderFilterStrategy();
> used by copyNonStandardHeaders() (line 283) when headersInline unmarshal
> copies MIME headers onto the exchange. DefaultHeaderFilterStrategy only knows
> Camel*/camel*, so the mail.smtp./mail.smtps. namespace that CAMEL-23522
> deliberately filters on the consumer path is not filtered here.
> Proposal: use MailHeaderFilterStrategy (or a strategy configured with the
> same inbound prefixes) in MimeMultipartDataFormat so both entry points agree
> on the filtered namespace, with a test covering a mail.smtp.* header on
> unmarshal. Backport alongside the CAMEL-23891 backports (4.14.x, 4.18.x).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)