[issue30500] urllib connects to a wrong host

2017-06-07 Thread STINNER Victor
STINNER Victor added the comment: > I think the best behavior is to do what popular web browsers do. Chrome and > Firefox, for example, parses this is host 127.0.0.1, path /, fragment > #@evil.com. I agree that in case of doubt, it's better to follow the implementation of most popular web

[issue30500] urllib connects to a wrong host

2017-05-29 Thread Nam Nguyen
Nam Nguyen added the comment: I think the best behavior is to do what popular web browsers do. Chrome and Firefox, for example, parses this is host 127.0.0.1, path /, fragment #@evil.com. If the code does want to support username/password, it should do a custom opener (with basic HTTP

[issue30500] urllib connects to a wrong host

2017-05-29 Thread Nam Nguyen
Changes by Nam Nguyen : -- pull_requests: +1937 ___ Python tracker ___ ___

[issue30500] urllib connects to a wrong host

2017-05-28 Thread Martin Panter
Martin Panter added the comment: See also Issue 18140, where it looks like people _want_ the hash (#) to be part of the username and/or password. Another option may be to raise an exception. -- nosy: +martin.panter ___ Python tracker

[issue30500] urllib connects to a wrong host

2017-05-28 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: +Python 3.5, Python 3.6 ___ Python tracker ___

[issue30500] urllib connects to a wrong host

2017-05-28 Thread Nam Nguyen
New submission from Nam Nguyen: Reported by Orange Tsai: == Hi, Python Security Team import urllib from urlparse import urlparse url = 'http://127.0.0.1#@evil.com/' print urlparse(url).netloc # 127.0.0.1 print urllib.urlopen(url).read()# will access evil.com I have