This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kwojniak_box
Recipients kwojniak_box, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-08-20.20:26:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566332813.63.0.906100778728.issue37900@roundup.psfhosted.org>
In-reply-to
Content
proxy_bypass_registry() will split the ProxyOverride registry key by semicolon. Then for each value it uses that value as a regular expression pattern with match(). However, if this value is not a valid regular expression, then match() will throw an exception that goes uncaught. This then breaks the loop and prevents the function from working correctly on other valid input.

It's easy to reproduce:

1. Set this registry key to 1 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable
2. Set HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride to this value (create as a string if necessary):
[]-78;
3. Call urllib.proxy_bypass()

My suggestion for a fix would be to catch exceptions from match() in the loop and continue the loop on error.
History
Date User Action Args
2019-08-20 20:26:53kwojniak_boxsetrecipients: + kwojniak_box, paul.moore, tim.golden, zach.ware, steve.dower
2019-08-20 20:26:53kwojniak_boxsetmessageid: <1566332813.63.0.906100778728.issue37900@roundup.psfhosted.org>
2019-08-20 20:26:53kwojniak_boxlinkissue37900 messages
2019-08-20 20:26:53kwojniak_boxcreate