Fix possible HTTP Response Splitting#377
Merged
macournoyer merged 2 commits intomasterfrom May 20, 2021
Merged
Conversation
Collaborator
|
Should this raise an error? |
Owner
Author
|
I based my approach on Puma's https://github.com/puma/puma/blob/3846a4e0ae9cdfe80b4dfb7fc477f03ec4cabb9d/lib/puma/server.rb#L775 |
Ignore any response header with \r or \n in their value See GHSA-84j7-475p-hp8v
0cd4a4a to
dd24bf5
Compare
Collaborator
|
I personally think this should raise an exception as it represents a faulty request and I don't think we should try to interpret the remainder of the request as valid. |
|
How about the following modifications of webrick? |
Collaborator
|
This looks good to me. Does this result in a 400 Bad Request? |
ioquatix
approved these changes
May 18, 2021
No. 500 Internal Server Error But, I also think 400 is a valid response code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ignore any response header with
\ror\nin their value.See GHSA-84j7-475p-hp8v