Skip to content
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

Prevent CRLF injection due to broken URL normalizer #765

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Sep 27, 2023

If a custom URL normaliser does not filter out white-space, raise an exception to prevent CRLF injection. Whitespace, in particular \n, is never allowed in path, query or hostname.

This is not a security fix as such but an extra line of defence.

lib/http/request.rb Outdated Show resolved Hide resolved
@c960657 c960657 requested a review from tarcieri October 3, 2023 21:46
@tarcieri tarcieri requested a review from ixti October 4, 2023 00:37
Copy link
Member

@ixti ixti left a comment

Choose a reason for hiding this comment

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

LGTM

@ixti ixti merged commit 65276d7 into httprb:main Oct 4, 2023
8 checks passed
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.

3 participants