Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-36216: Add check for characters in netloc that normalize to separators #12201
Conversation
…ators
Please optimize |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Mar 6, 2019
When you're done making the requested changes, leave the comment: |
This comment has been minimized.
This comment has been minimized.
sorry, GH didn't refresh. |
This comment has been minimized.
This comment has been minimized.
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). |
…ators (pythonGH-12201)
…ators (pythonGH-12201)
…ators (pythonGH-12201)
…ators (pythonGH-12201)
…ators (pythonGH-12201)
…ators (pythonGH-12201)
…ators (pythonGH-12201)
netloc2 = unicodedata.normalize('NFKC', netloc) | ||
if netloc == netloc2: | ||
return | ||
_, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay |
This comment has been minimized.
This comment has been minimized.
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
…ators (pythonGH-12201)
…ators (pythonGH-12201)
…ators (pythonGH-12201)
zooba commentedMar 6, 2019
•
edited by bedevere-bot
https://bugs.python.org/issue36216