This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sanebow
Recipients sanebow
Date 2019-03-18.08:06:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The urlparse function in Python urllib returns the wrong hostname when parsing URL crafted by the malicious user. This may be caused by incorrect handling of IPv6 addresses. The bug could lead to open redirect in web applications which rely on urlparse to extract and validate the domain of redirection URL.

The test case is as follows:

>>> from urllib.parse import urlparse
>>> urlparse(urlparse('\[]').hostname
>>> ''

The correct behavior should be raising an invalid URL exception.
Date User Action Args
2019-03-18 08:06:11sanebowsetrecipients: + sanebow
2019-03-18 08:06:11sanebowsetmessageid: <>
2019-03-18 08:06:11sanebowlinkissue36338 messages
2019-03-18 08:06:11sanebowcreate