[issue33342] urllib IPv6 parsing fails with special characters in passwords

2019-01-23 Thread Terrence Brannon


Terrence Brannon  added the comment:

I would like to add to this bug - the password field on the URL cannot contain 
a pound sign or question mark or the parser incorrectly parses the URL, as this 
gist demonstrates - 
https://gist.github.com/metaperl/fc6f43bf6b9a9f874b8f27e29695e68c

--
nosy: +metaperl

___
Python tracker 
<https://bugs.python.org/issue33342>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33342] urllib IPv6 parsing fails with special characters in passwords

2019-01-24 Thread Terrence Brannon


Terrence Brannon  added the comment:

Regarding "RFC 2396 explicitly excludes the use of [ and ] in URLs. RFC 2732 
<https://www.ietf.org/rfc/rfc2732.txt> defines the syntax for IPv6 URLs, and 
allows [ and ] ONLY in the host part.

So I'd say that the behaviour is arguably correct (if somewhat unfortunate)"

I would say that a square bracket CAN be used in the password, but that it 
should be urlencoded and that this library should perform a urldecode for both 
username and password, just as SQLAlchemy does.

--

___
Python tracker 
<https://bugs.python.org/issue33342>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33342] urllib IPv6 parsing fails with special characters in passwords

2019-01-24 Thread Terrence Brannon


Terrence Brannon  added the comment:

Also note, if SQLAlchemy gives any guidance, then note that SA unquotes both 
the username and password of the URL:

https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/engine/url.py#L274

--

___
Python tracker 
<https://bugs.python.org/issue33342>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com