fix: problematic parsing leniency in parsing chunk extensions#3327
fix: problematic parsing leniency in parsing chunk extensions#3327JeppW wants to merge 2 commits intobenoitc:masterfrom
Conversation
|
Any thoughts on singling out just the newline, among multiple characters that could conceivably cause trouble behind a |
|
AFAIK only the newline has ever been shown to be exploitable in practice. Perhaps we should disallow \r as well, it seems plausible that a proxy could misinterpret \rX as a line terminator. Other than that, I think further validation would just be unnecessary overhead. |
|
I added the \r as we agreed. |
|
On hwich specification is based this change? |
|
@benoitc You can reference the 2022 one. Control chars were never supposed to appear in chunk extensions: The choice of |
Stop allowing newline characters in chunk extensions. This can cause request smuggling issues with some reverse proxies.
Reference: https://grenfeldt.dev/2021/10/08/gunicorn-20.1.0-public-disclosure-of-request-smuggling/