This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch camel-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.14.x by this push:
     new 5c20de8f047d CAMEL-23222: Filter inbound Camel headers in 
MailHeaderFilterStrategy
5c20de8f047d is described below

commit 5c20de8f047de725e0b32a874cdb5108c3e46558
Author: Guillaume Nodet <[email protected]>
AuthorDate: Fri Mar 20 15:03:45 2026 +0100

    CAMEL-23222: Filter inbound Camel headers in MailHeaderFilterStrategy
    
    Backport of #22149. 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);
     }
 
 }

Reply via email to