This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 540d48e1cb5e CAMEL-23222: Filter inbound Camel headers in
MailHeaderFilterStrategy
540d48e1cb5e is described below
commit 540d48e1cb5e492bd1c74bfc5a6e929fcf24fe3b
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);
}
}