You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/10/10 12:21:05 UTC
[PR] test: cover control characters around the request-line version token [pekko-http]
pjfanning opened a new pull request, #1341:
URL: https://github.com/apache/pekko-http/pull/1341
### Motivation
[netty/netty#16970](https://github.com/netty/netty/issues/16970) was a request-smuggling bug in which control bytes around the HTTP version token were stripped before matching. #1088 covered a NUL byte in the request target, but nothing covered control bytes next to the version, in the method, or the other control characters #1087 lists (VT, FF, CR).
### Modification
Add `RequestParserSpec` cases, run in both the CRLF and LF variants, for:
- NUL, VT, FF and bare CR immediately before and after `HTTP/1.1` → 505
- NUL before and inside the method → 501
- VT and FF in the request target → 400
Inputs bypass `prep`, so the CR cases keep their exact bytes in both line-ending variants.
### Result
A future parser change that trims control bytes around the version token fails these tests.
### Tests
- `sbt "http-core/testOnly *RequestParserCRLFSpec *RequestParserLFSpec"`: 138 passed
- With `HttpRequestParser` temporarily changed to skip NUL/VT/FF/bare CR around the version, `a control character before or after the HTTP version` fails
- `sbt http-core/Test/scalafmtCheck`: pass
### References
Fixes #1087
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: reject control bytes in the request line and malformed HTTP/2 :scheme and field names [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #1341:
URL: https://github.com/apache/pekko-http/pull/1341
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: reject control bytes in the request line and malformed HTTP/2 :scheme and field names [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #1341:
URL: https://github.com/apache/pekko-http/pull/1341#issuecomment-6142884277
Nice we can track netty to identity problems
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org