Issue 26572: urlparse does not handle passwords with ? in them.

Created on 2016-03-16 21:01 by Rob Church, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg261860 - (view) Author: Rob Church (Rob Church) Date: 2016-03-16 21:01
>>> urlparse('http://user:pass?word@example.com/path?query')
ParseResult(scheme='http', netloc='user:pass', path='', params='', query='word@example.com/path?query', fragment='')

Expected output is:

ParseResult(scheme='http', netloc='user:pass?word@example.com', path='/path', params='', query='query', fragment='')
msg261864 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-03-16 21:23
I think this is the same as Issue 18140. Perhaps you can answer my question at the bottom there about why the question mark is not encoded, and why splitting at the at (@) symbol should be higher priority than the query (?) symbol.
History
Date User Action Args
2022-04-11 14:58:28adminsetgithub: 70759
2016-03-16 21:23:17martin.pantersetstatus: open -> closed

nosy: + martin.panter
messages: + msg261864

superseder: urlparse, urlsplit confused when password includes fragment (#), query (?)
resolution: duplicate

2016-03-16 21:01:16Rob Churchcreate