[New-bugs-announce] [issue37853] [urllib.parse.urlparse] It does not correctly parse the URL with basic authentication.
Fatih Sarhan
report at bugs.python.org
Wed Aug 14 13:37:25 EDT 2019
New submission from Fatih Sarhan <f9n at protonmail.com>:
No problem for these:
"http://localhost:9100"
"http://user:password@localhost:9100"
But, these are problematic:
"http://use#r:password@localhost:9100"
"http://user:pass#word@localhost:9100"
```
from urllib.parse import urlparse
url = "http://us#er:123@localhost:9001/RPC2"
u = urlparse(url)
print(u)
# ParseResult(scheme='http', netloc='us', path='', params='', query='', fragment='er:123 at localhost:9001/RPC2')
```
----------
components: Library (Lib)
messages: 349721
nosy: f9n
priority: normal
severity: normal
status: open
title: [urllib.parse.urlparse] It does not correctly parse the URL with basic authentication.
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37853>
_______________________________________
More information about the New-bugs-announce
mailing list