You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2026/03/20 12:36:39 UTC
(camel) 01/01: CAMEL-23222: Filter inbound Camel headers in MailHeaderFilterStrategy
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch backport-mail-header-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 945e1749029b19ac62fcf0232f4e9d68f6b3777c
Author: Guillaume Nodet <gn...@gmail.com>
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);
}
}