Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-38576: Disallow control characters in hostnames in http.client#18995

Merged
gpshead merged 2 commits into
python:masterpython/cpython:masterfrom
epicfaace:urlepicfaace/cpython:urlCopy head branch name to clipboard
Mar 14, 2020
Merged

bpo-38576: Disallow control characters in hostnames in http.client#18995
gpshead merged 2 commits into
python:masterpython/cpython:masterfrom
epicfaace:urlepicfaace/cpython:urlCopy head branch name to clipboard

Conversation

@epicfaace

@epicfaace epicfaace commented Mar 14, 2020

Copy link
Copy Markdown
Contributor

Extends #12755 to apply to hostnames.

https://bugs.python.org/issue38576

@gpshead gpshead self-assigned this Mar 14, 2020
@gpshead gpshead added needs backport to 3.6 type-bug An unexpected behavior, bug, or error type-security A security issue labels Mar 14, 2020
@gpshead

gpshead commented Mar 14, 2020

Copy link
Copy Markdown
Member

Thanks!

While reviewing I also looked over the _get_hostport(host, port) call that happens before _validate_host(host). I do not believe that will cause any problems, the validation is still doing the right thing even if that transformed host to extract a port number.

@gpshead gpshead merged commit 9165add into python:master Mar 14, 2020
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @epicfaace for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 14, 2020
…ythonGH-18995)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165add)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-19000 is a backport of this pull request to the 3.8 branch.

@bedevere-bot

Copy link
Copy Markdown

GH-19001 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 14, 2020
…ythonGH-18995)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165add)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-19002 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 14, 2020
…ythonGH-18995)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165add)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
miss-islington added a commit that referenced this pull request Mar 14, 2020
…H-18995)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165add)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
miss-islington added a commit that referenced this pull request Mar 14, 2020
…H-18995)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165add)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
@epicfaace epicfaace deleted the url branch March 14, 2020 20:09
ned-deily pushed a commit that referenced this pull request Mar 14, 2020
…H-18995) (GH-19002)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165add)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
@tapakund

Copy link
Copy Markdown

#19231 is a back port of this PR to 3.5 branch.

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

Labels

type-bug An unexpected behavior, bug, or error type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.