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

[3.4] bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201) #12224

Merged
merged 1 commit into from
Mar 11, 2019

Conversation

zooba
Copy link
Member

@zooba zooba commented Mar 7, 2019

@zooba
Copy link
Member Author

zooba commented Mar 7, 2019

Ping @larryhastings (but wait for CI, since I didn't re-test locally with 3.4)

netloc2 = unicodedata.normalize('NFKC', netloc)
if netloc == netloc2:
return
_, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not asking you to change this, just a suggestion in the future: you might as well have spelled this

netloc = netloc.rpartition('@')[2]

@larryhastings larryhastings merged commit 62d3654 into python:3.4 Mar 11, 2019
@bedevere-bot
Copy link

@larryhastings: Please replace # with GH- in the commit message next time. Thanks!

@larryhastings
Copy link
Contributor

Thanks for the backport! Our cookies are once again safe.

@zooba zooba deleted the bpo-36216-3.4 branch March 12, 2019 15:43
@mcepl
Copy link
Contributor

mcepl commented Apr 9, 2019

Thanks for the backport! Our cookies are once again safe.

That sounds shockingly dirty …

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