[issue23516] pip: urllib3 does not encode userinfo section of requests: parse_url() mishandles special characters when the URL specifies authentication credentials

Demian Brecht report at bugs.python.org
Wed Feb 25 23:17:32 CET 2015


Demian Brecht added the comment:

FWIW, setting up a local authenticated (ncsa_auth) squid proxy, this breaks using pip 0.6.8:

pip --proxy http://special:my?password@localhost:3128 install <package>

While the percent-encoded version is successful:

pip --proxy http://special:my%3Fpassword@localhost:3128 install <package>


It's odd that you would encounter the same error with an encoded password. It might be helpful if you could supply an example of the full proxy URL you're experiencing the problem with when using an encoded password.

It seems to me that it is functioning as expected based on the RFC, but could definitely use some better detection and error reporting around malformed URLs (as Senthil mentions in #23328). I'm setting the status of this issue to pending (assuming it will be closed as a fix for this would be done outside of the standard library) until someone with more expertise with pip takes a look.

----------
components: +Demos and Tools -Extension Modules
status: open -> pending
title: requests: parse_url() mishandles special characters when the URL specifies authentication credentials -> pip: urllib3 does not encode userinfo section of requests: parse_url() mishandles special characters when the URL specifies authentication credentials

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


More information about the Python-bugs-list mailing list