-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect responses for invalid or multiple content-length #900
Comments
Tests for this case created as part of #619 |
This is also subject for #541, protection against HTTP Request Splitting attack, so please update the Wiki page when the issue is finished. We don't need Frang rules since this is prohibited by the RFC, so the parser must be adjusted instead. |
https://tools.ietf.org/html/rfc7230#section-3.3.3 In requests like
,
,
we must reply 400 In same cases for responses we must reply 502 In cases of equal content length in request
,
we must reject OR merge into 1 header
|
I think, in case of multiple equal content-length in response, we should also merge them or reject. |
also i think we should remove content-length header in case of chunked body |
You're absolutely right:
|
I've misunderstood "If a message is received" as request message. It looks that case of response is also related here |
Yes, we must do that. RFC 7230 3.3.3 point 3:
|
Fix #900: Change some comments and add unit tests.
All specified above cases are already handled in Tempesta FW code, according the most strict scenario described in RFC: all HTTP messages with misused |
According to RFC7230 3.3.3.4, if we have 2 or more different content-length, for response we must respond 400 to client, and for backend response we must response 502.
Now we have 403 and 500
The text was updated successfully, but these errors were encountered: