8000 [3.3] bpo-22928: Disabled HTTP header injections in http.client. by serhiy-storchaka · Pull Request #2817 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.3] bpo-22928: Disabled HTTP header injections in http.client. #2817

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

Merged
merged 2 commits into from
Jul 26, 2017

Conversation

serhiy-storchaka
Copy link
Member
@serhiy-storchaka serhiy-storchaka commented Jul 22, 2017

Original patch by Demian Brecht.
(cherry picked from commit a112a8a)

https://bugs.python.org/issue22928

…lient.

Original patch by Demian Brecht..
(cherry picked from commit a112a8a)
@mention-bot
Copy link

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pitrou, @gvanrossum and @orsenthil to be potential reviewers.

@vstinner
Copy link
Member

See my comment on the bpo: http://bugs.python.org/issue22928#msg299053


# the patterns for both name and value are more leniant than RFC
# definitions to allow for backwards compatibility
_is_legal_header_name = re.compile(rb'[^:\s][^:\r\n]*\Z').match
Copy link
Member

Choose a reason for hiding this comment

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

Python 2.7 regex starts with \A. Is it useful?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. match() always matches from the start.

Copy link
Member
@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@ned-deily ned-deily merged commit 8e88f6b into python:3.3 Jul 26, 2017
@serhiy-storchaka serhiy-storchaka deleted the backport-a112a8a-3.3 branch August 9, 2017 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-security A security issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0