mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Fixes GH-94101
Automerge-Triggered-By: GH:tiran
(cherry picked from commit dc8e1d0390
)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
This commit is contained in:
parent
c1bfff4f6b
commit
58d6a86bad
2 changed files with 5 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
||||||
|
Manual instantiation of :class:`ssl.SSLSession` objects is no longer allowed
|
||||||
|
as it lead to misconfigured instances that crashed the interpreter when
|
||||||
|
attributes where accessed on them.
|
|
@ -5067,7 +5067,8 @@ static PyType_Spec PySSLSession_spec = {
|
||||||
.name = "_ssl.SSLSession",
|
.name = "_ssl.SSLSession",
|
||||||
.basicsize = sizeof(PySSLSession),
|
.basicsize = sizeof(PySSLSession),
|
||||||
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
|
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
|
||||||
Py_TPFLAGS_IMMUTABLETYPE),
|
Py_TPFLAGS_IMMUTABLETYPE |
|
||||||
|
Py_TPFLAGS_DISALLOW_INSTANTIATION),
|
||||||
.slots = PySSLSession_slots,
|
.slots = PySSLSession_slots,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue