New submission from Petter S <petter.strandm...@gmail.com>:

The following code crashes with TypeError:

URLopener().open("unknown_proxy://test")

the expected behavior is an OSError, which is normally raised for unknown 
protocols.

This implementation of directly calling a method called "unknown_proxy" is 
fragile and was recently the subject of a security issue: 
https://bugs.python.org/issue35907 (CVE-2019-9948)

Would be good to make this more robust.

----------
components: Library (Lib)
messages: 369291
nosy: Petter S
priority: normal
severity: normal
status: open
title: UrlOpener raises different exceptions based on implementation detail
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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

Reply via email to