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

Comments

Projects
None yet
1 participant
@bertjwregeer
Member

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

This comment has been minimized.

Show comment
Hide comment
@bertjwregeer

bertjwregeer Oct 7, 2015

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@bertjwregeer

bertjwregeer Dec 29, 2015

Member

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).

Member

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

This comment has been minimized.

Show comment
Hide comment
@bertjwregeer

bertjwregeer Dec 29, 2015

Member

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

Member

bertjwregeer commented Dec 29, 2015

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

@pyup-bot pyup-bot referenced this issue Jun 30, 2017

Merged

Initial Update #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment