New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

There are several issues with urllib.request.proxy_bypass_environment:

1. Leading dots are ignored in the proxy list, but not in the checked hostname. 
So ".localhost" does not matches ".localhost" in the proxy list.

2. A single trailing \n in the checked hostname is ignored, so "localhost\n" 
passes the check if the proxy list contains "localhost". But "localhost\n\n" 
and "localhost " do not pass. This is an artifact of using $ in the regular 
expression.

----------
components: Library (Lib)
messages: 358444
nosy: orsenthil, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Issues with urllib.request.proxy_bypass_environment
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39057>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to