This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch backport-mail-header-4.14.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit de62f36fc9729bce11a9d80116e510380f05a533 Author: Guillaume Nodet <[email protected]> AuthorDate: Fri Mar 20 13:35:47 2026 +0100 CAMEL-23222: Filter inbound Camel headers in MailHeaderFilterStrategy Add setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH) to MailHeaderFilterStrategy to prevent external sources from injecting Camel-prefixed headers on inbound messages. --- .../java/org/apache/camel/component/mail/MailHeaderFilterStrategy.java | 1 + 1 file changed, 1 insertion(+) diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailHeaderFilterStrategy.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailHeaderFilterStrategy.java index 7c35a9f95e61..659cdcfbb039 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailHeaderFilterStrategy.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailHeaderFilterStrategy.java @@ -28,6 +28,7 @@ public class MailHeaderFilterStrategy extends DefaultHeaderFilterStrategy { setLowerCase(true); // filter headers begin with "Camel" or "org.apache.camel" setOutFilterStartsWith(CAMEL_FILTER_STARTS_WITH); + setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH); } }
