[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

Martin Panter report at bugs.python.org
Wed Feb 25 00:52:42 CET 2015


Martin Panter added the comment:

Sounds like this might be in a third-party module, not in Python itself. But see also Issue 23328 and Issue 18140.

The RFC you referenced also says this, which suggests the authority cannot contain a literal question mark:

‘The authority component . . . is terminated by the next slash ("/"), question mark ("?"), or number sign ("#") character, or by the end of the URI.’

Some more definitions from that RFC indicating a literal question mark is not allowed in “userinfo”:

userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded = "%" HEXDIG HEXDIG
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="

----------
nosy: +vadmium

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23516>
_______________________________________


More information about the Python-bugs-list mailing list