New submission from kmille <[email protected]>:
Hey,
chs@gw-sss-nb8:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
chs@gw-sss-nb8:~$ python3 --version
Python 3.5.2
chs@gw-sss-nb8:~$ cat segfault.py
import ssl
import socket
hostname = "www.xn--b.buchhandlunggründen.de"
ctx = ssl.create_default_context()
s = ctx.wrap_socket(socket.socket(), server_hostname=hostname)
s.check_hostname = True
try:
s.connect((hostname, 443))
except UnicodeError as incorrect_punycode:
pass
chs@gw-sss-nb8:~$ python3 segfault.py
Segmentation fault
The problem does not occur if I remove the ü in www.xn--b.buchhandlunggründen.de
On my Arch the DNS fails (above the name doesn't resolve too but I seems like
it doesn't matter):
kmille@linbox timetracking master % python3 omg.py
Traceback (most recent call last):
File "omg.py", line 10, in <module>
s.connect((hostname, 443))
File "/usr/lib/python3.7/ssl.py", line 1150, in connect
self._real_connect(addr, False)
File "/usr/lib/python3.7/ssl.py", line 1137, in _real_connect
super().connect(addr)
socket.gaierror: [Errno -2] Name or service not known
kmille@linbox timetracking master % python3 --version
Python 3.7.3
If you need further help please ask.
Thank you for python <3
kmille
----------
components: ctypes
messages: 345140
nosy: kmille
priority: normal
severity: normal
status: open
title: SSL socket segfaults during a connect() using a punycode domain containg
a umlaut
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37217>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com