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.

classification
Title: [xmlrpc.client.ServerProxy] It does not correctly parse the URL with basic authentication.
Type: Stage:
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: CuriousLearner, f9n
Priority: normal Keywords:

Created on 2019-08-14 17:49 by f9n, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg349726 - (view) Author: Fatih Sarhan (f9n) Date: 2019-08-14 17:49
Same problem here. (https://bugs.python.org/issue37853)
msg349728 - (view) Author: Fatih Sarhan (f9n) Date: 2019-08-14 17:56
I just changed things and it works. But it's not right. It must be better way.(The 'urllib.parse.urlparse' function's bug should be fixed. )

https://github.com/f9n/cpython/tree/fix-issue-37854
msg349730 - (view) Author: Sanyam Khurana (CuriousLearner) * (Python triager) Date: 2019-08-14 18:02
Closed Issue 37853 as a duplicate.

Adding Fatih's comment from there for urllib.parse.urlparse


-------------------------------------------------------------

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@localhost:9001/RPC2')
```


--------------------------------------
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82035
2019-08-14 18:02:17CuriousLearnersetnosy: + CuriousLearner

messages: + msg349730
versions: - Python 3.5, Python 3.6
2019-08-14 17:56:58f9nsetmessages: + msg349728
2019-08-14 17:49:16f9ncreate