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

bpo-36216: Add check for characters in netloc that normalize to separators #12201

Merged
merged 2 commits into from Mar 7, 2019

Conversation

@zooba
Copy link
Member

zooba commented Mar 6, 2019

Lib/urllib/parse.py Outdated Show resolved Hide resolved
Copy link
Member

tiran left a comment

Please optimize import unicodedata.

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Mar 6, 2019

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@tiran
tiran approved these changes Mar 6, 2019
@tiran

This comment has been minimized.

Copy link
Member

tiran commented Mar 6, 2019

sorry, GH didn't refresh.

@zooba

This comment has been minimized.

Copy link
Member Author

zooba commented Mar 7, 2019

I'm removing the "needs backport" tags and will create the backports manually. In particular, the docs need to be slightly different for each version.

I'll probably also have to come back later and add the CVE reference once we're assigned one (if we want it in there).

@zooba zooba merged commit 16e6f7d into python:master Mar 7, 2019
5 checks passed
5 checks passed
Azure Pipelines PR #20190306.24 succeeded
Details
bedevere/issue-number Issue number 36216 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zooba zooba deleted the zooba:urllib-bug branch Mar 7, 2019
zooba added a commit to zooba/cpython that referenced this pull request Mar 7, 2019
zooba added a commit to zooba/cpython that referenced this pull request Mar 7, 2019
zooba added a commit to zooba/cpython that referenced this pull request Mar 7, 2019
zooba added a commit that referenced this pull request Mar 7, 2019
…ators (GH-12201)
zooba added a commit that referenced this pull request Mar 7, 2019
…ators (GH-12201)
zooba added a commit to zooba/cpython that referenced this pull request Mar 7, 2019
zooba added a commit to zooba/cpython that referenced this pull request Mar 7, 2019
larryhastings added a commit that referenced this pull request Mar 11, 2019
larryhastings added a commit that referenced this pull request Mar 11, 2019
ned-deily added a commit that referenced this pull request Mar 12, 2019
ma8ma added a commit to ma8ma/cpython that referenced this pull request Apr 7, 2019
arnolddumas added a commit to arnolddumas/cpython that referenced this pull request May 3, 2019
netloc2 = unicodedata.normalize('NFKC', netloc)
if netloc == netloc2:
return
_, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay

This comment has been minimized.

Copy link
@mcepl

mcepl May 28, 2019

Contributor

@zooba @tiran Could you tell me something about this line (it is now https://github.com/python/cpython/blob/master/Lib/urllib/parse.py#L405)? It seems to me that it exactly makes the first example from https://bugs.python.org/issue36216 fail as before:

>>> u = "https://example.com\uFF03@bing.com"
>>> urlsplit(u).netloc.rpartition("@")[2]
bing.com
mingwandroid added a commit to mingwandroid/cpython that referenced this pull request Aug 6, 2019
mingwandroid added a commit to mingwandroid/cpython that referenced this pull request Aug 6, 2019
mingwandroid added a commit to mingwandroid/cpython that referenced this pull request Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.