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.

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 2022-04-11 14:59 by admin. 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 committer) Date: 2020-10-16 22:21
Can this be closed?
History
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80764
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