oscerd opened a new pull request, #24828: URL: https://github.com/apache/camel/pull/24828
### Motivation When receiving a message with `preserveHeaders=true`, the IronMQ consumer deserializes a JSON envelope (a headers map and a body) and copies the embedded header entries onto the Camel message (`GsonUtil.copyFrom`, called from `IronMQConsumer`) without applying a `HeaderFilterStrategy`. The envelope is fully sender-controlled, so a sender can inject Camel-internal control headers (the `Camel*` namespace) onto the exchange. ### Changes - `GsonUtil.copyFrom` now routes the embedded envelope headers through a `DefaultHeaderFilterStrategy` (`applyFilterToExternalHeaders`), so `Camel*` headers (matched case-insensitively) are no longer mapped onto the Camel message — consistent with the inbound header filtering performed by other consumers, and with the same approach as the structured-mode CloudEvent fix in CAMEL-24084 (#24724). - New `IronMQConsumerHeaderFilterTest` pushing a crafted envelope through the existing `MockQueue`: ordinary headers still propagate, `Camel*` entries are filtered. - Upgrade-guide entry in `camel-4x-upgrade-guide-4_22.adoc`. Note: camel-ironmq is deprecated since 4.21, but still ships; the same envelope mapping exists on the 4.18.x/4.14.x maintenance branches, so this is a backport candidate (those branches need the explicit `setInFilterStartsWith` variant, pre-CAMEL-23543). ### Testing - `mvn clean install` in `components/camel-ironmq`: all tests pass (new test + existing preserve-headers round-trip). - Full reactor `mvn clean install -DskipTests` from root: success, no stale generated files. _Claude Code on behalf of Andrea Cosentino (@oscerd)._ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
