[issue36338] urlparse of urllib returns wrong hostname

STINNER Victor report at bugs.python.org
Tue Sep 10 04:07:39 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

Python 3.5 and newer are impacted, but Python 2.7 behaves differently:

vstinner at apu$ python2
Python 2.7.16 (default, Apr 30 2019, 15:54:43) 
>>> from urlparse import urlparse
>>> urlparse('http://demo.com[attacker.com]').hostname
'emo.com[attacker.com'

----------
versions: +Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36338>
_______________________________________


More information about the Python-bugs-list mailing list