classification
Title: Do not swallow exceptions in the _ssl module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: alex, christian.heimes, dstufft, iritkatriel, janssen, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-04-10 07:22 by serhiy.storchaka, last changed 2020-10-18 09:31 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12756 merged serhiy.storchaka, 2019-04-10 08:27
Messages (2)
msg339827 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-10 07:22
Currently some exceptions can be swallowed in the _ssl module. The proposed PR fixes this. Some examples:

* Use PyDict_GetItemWithError() instead of PyDict_GetItem(). The latter swallows any exceptions. Although it is very unlikely that an exception be raised here, it may be possible.

* Do not overwrite arbitrary exceptions in PyUnicode_FSConverter(), PyUnicode_AsASCIIString() and PyObject_GetBuffer(). MemoryError most likely can be raised in the first two cases. Only expected exceptions (TypeError or UnicodeEncodeError) will now be replaced with a TypeError, and cadata type will be checked before trying to get a buffer or encode.
msg378770 - (view) Author: Irit Katriel (iritkatriel) * (Python triager) Date: 2020-10-16 22:21
Can this be closed?
History
Date User Action Args
2020-10-18 09:31:18serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-16 22:21:57iritkatrielsetnosy: + iritkatriel
messages: + msg378770
2019-04-10 12:23:55christian.heimessetassignee: serhiy.storchaka
type: enhancement
2019-04-10 08:27:06serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request12686
2019-04-10 07:22:39serhiy.storchakacreate