Skip to content

bpo-30594: Add a test for bad IDNA in ssl server_hostname #1997

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 1 commit into from
Jun 9, 2017

Conversation

njsmith
Copy link
Contributor

@njsmith njsmith commented Jun 8, 2017

See discussion:
#1992 (comment)

@njsmith
Copy link
Contributor Author

njsmith commented Jun 8, 2017

CC @Haypo @serhiy-storchaka

@njsmith njsmith force-pushed the make-victor-happy branch from 820c462 to f3c34f1 Compare June 8, 2017 11:06
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for the test.

@serhiy-storchaka serhiy-storchaka changed the title [trivial] Add a test for bad IDNA in ssl server_hostname bpo-30594: Add a test for bad IDNA in ssl server_hostname Jun 8, 2017
@serhiy-storchaka serhiy-storchaka added the tests Tests in the Lib/test dir label Jun 8, 2017
ctx = ssl.create_default_context()
# Do it a few times, because this used to cause memory corruption
# https://bugs.python.org/issue30594
for _ in range(5):
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that it's worth it to run it in a loop. Just run it once. It's only a regression test. We have enough buildbots to catch race conditions if there is a test ;-)

# free to remove it.
ctx = ssl.create_default_context()
# Do it a few times, because this used to cause memory corruption
# https://bugs.python.org/issue30594
Copy link
Member

Choose a reason for hiding this comment

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

Usually, we just write "# bpo-30594: ..."

@njsmith njsmith force-pushed the make-victor-happy branch from f3c34f1 to 93f1659 Compare June 9, 2017 08:37
@njsmith njsmith force-pushed the make-victor-happy branch from 93f1659 to a30411e Compare June 9, 2017 08:38
@njsmith
Copy link
Contributor Author

njsmith commented Jun 9, 2017

Comments addressed.

@vstinner vstinner merged commit 59fdf0f into python:master Jun 9, 2017
@vstinner
Copy link
Member

vstinner commented Jun 9, 2017

Thanks @njsmith for the unit test! I merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants