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

HTTP Response Splitting #117

Closed
bertjwregeer opened this issue Oct 7, 2015 · 3 comments
Closed

HTTP Response Splitting #117

bertjwregeer opened this issue Oct 7, 2015 · 3 comments
Assignees

Comments

@bertjwregeer
Copy link
Member

@bertjwregeer bertjwregeer commented Oct 7, 2015

If for some reason an application returns a header dictionary that contains a header that has \r\n in it:

[
    ('Location', 'http://example.com\r\nX-Test: false')
]

This will then on https://github.com/Pylons/waitress/blob/master/waitress/task.py#L260 get sent directly to the user, which would mean the end user sees the following:

Location: http://example.com/
X-Test: false

Which is bad (tm).

@bertjwregeer
Copy link
Member Author

@bertjwregeer bertjwregeer commented Oct 7, 2015

See: Pylons/webob#217 where this was reported for WebOb and I don't believe that is the correct location to fix this.

@bertjwregeer
Copy link
Member Author

@bertjwregeer bertjwregeer commented Dec 29, 2015

Currently waitress is not PEP3333 compliant:

Servers should check for errors in the headers at the time start_response is called, so that an error can be raised while the application is still running.

We should do a check to make sure that the header value does not contain illegal characters (control characters in this case).

@bertjwregeer bertjwregeer self-assigned this Dec 29, 2015
@bertjwregeer
Copy link
Member Author

@bertjwregeer bertjwregeer commented Dec 29, 2015

We should be doing this, like mod_wsgi: Pylons/webob#217 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.