Skip to content

[UNDERTOW-2763] As per RFC 9112 reason phrase is optional in HTTP responses#1952

Open
ropalka wants to merge 1 commit into
undertow-io:2.4.xfrom
ropalka:UNDERTOW-2763
Open

[UNDERTOW-2763] As per RFC 9112 reason phrase is optional in HTTP responses#1952
ropalka wants to merge 1 commit into
undertow-io:2.4.xfrom
ropalka:UNDERTOW-2763

Conversation

@ropalka
Copy link
Copy Markdown
Contributor

@ropalka ropalka commented May 13, 2026

Copy link
Copy Markdown
Contributor

@rhusar rhusar left a comment

Choose a reason for hiding this comment

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

Brief review, but LGTM; crux of the fix is removal of && sb.length() > 0.

I was going to say, this is missing split tests for RESPONSE2 and RESPONSE3 however, those are subsets of the testOneCharacterAtATime_response1/2/3, so I don't think they are needed.

@rhusar
Copy link
Copy Markdown
Contributor

rhusar commented May 14, 2026

Actually, @ropalka this is modifying a CVE fix so can you explain why relaxing this specific check is still safe as that appeard to be intentional strictness of the parser introduced in #1947?

I don't actually see that PR adding tests for this specifically, so the current tests are might not be enough to verify this doesn't reintroduce the CVE.

@ropalka
Copy link
Copy Markdown
Contributor Author

ropalka commented May 14, 2026

The strictness of expecting reason-phrase to have lenght >= 1 was an oversight @rhusar .
The test updated in this PR introduced RESPONSE2 & RESPONSE3 - both are omitting reason phrase to ensure it is tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants