Skip to content

[backport camel-4.18.x] CAMEL-25704: camel-undertow - refuse a request target or header value with control characters - #28064

Merged
davsclaus merged 1 commit into
camel-4.18.xfrom
backport/27944-to-camel-4.18.x
Oct 19, 2026
Merged

davsclaus merged 1 commit into
camel-4.18.xfrom
backport/27944-to-camel-4.18.x

Conversation

@gnodet

@gnodet gnodet commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Backport of #27944

Cherry-pick of dad7b54 to camel-4.18.x.
Conflicts resolved automatically by backport bot agent.

…t target or header value with control characters
@gnodet gnodet added the backport indicate that a Pull request is a backport from a fix from the main branch label Oct 18, 2026

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid security fix, correctly backported. The checkWriteable validation is well-reasoned: addresses both direct CR/LF injection and byte-narrowing attack (chars above 0xFF). Error handling properly catches IllegalArgumentException from both request-target and header validation paths and fails the exchange synchronously. Test coverage thorough. Identical to merged #27944 on main.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@gnodet gnodet added the lts label Oct 18, 2026

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gnodet. The code is a straight port of #27944: the changes to UndertowHelper, UndertowProducer, DefaultUndertowHttpBinding and UndertowProducerEncodedUriTest are identical to the main commit, and CI is green.

One thing about the upgrade guide note (inline): it is appended at the end of camel-4x-upgrade-guide-4_18.adoc, which puts it under "Upgrading Camel 4.17 to 4.18" instead of a new "Upgrading from 4.18.5 to 4.18.6" section. The project keeps the notes for maintenance releases in the guides on main (CLAUDE.md: "For backported changes, the upgrade guide entry must be added on the main branch"), as @oscerd does for the other camel-4.18.x ports this week (#28052, #28055). Could the doc change be dropped from this backport, and the note added to camel-4x-upgrade-guide-4_18.adoc on main under "Upgrading from 4.18.5 to 4.18.6" instead (or folded into #28052 / #28055, which already add that section)?

Claude Code on behalf of Claus Ibsen

at WARN the first time and at DEBUG on later polls; this log-level change also applies to the remote file consumers,
which keep their existing lexical check.

=== camel-undertow - the producer refuses a request target or header value with control characters

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lands under "Upgrading Camel 4.17 to 4.18", the oldest section of the file. The note belongs under "Upgrading from 4.18.5 to 4.18.6", in the guide on main rather than on camel-4.18.x.

@davsclaus davsclaus added this to the 4.18.6 milestone Oct 19, 2026
@davsclaus davsclaus added the bug Something isn't working label Oct 19, 2026
@davsclaus
davsclaus merged commit a3a0228 into camel-4.18.x Oct 19, 2026
3 checks passed
@github-actions
github-actions Bot deleted the backport/27944-to-camel-4.18.x branch October 19, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch bug Something isn't working lts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants