Skip to content

Commit 6a084b9

Browse files
[3.13] pythongh-126455: Disallow _ssl.SSLSocket instantiation (pythonGH-126481) (python#126486)
pythongh-126455: Disallow _ssl.SSLSocket instantiation (pythonGH-126481) Prevent creation of incomplete/invalid _ssl.SSLSocket objects when created directly. (cherry picked from commit b1c4ffc) Co-authored-by: Victor Stinner <[email protected]>
1 parent 4f15846 commit 6a084b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ssl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,7 @@ static PyType_Spec PySSLSocket_spec = {
29212921
.name = "_ssl._SSLSocket",
29222922
.basicsize = sizeof(PySSLSocket),
29232923
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE |
2924-
Py_TPFLAGS_HAVE_GC),
2924+
Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_DISALLOW_INSTANTIATION),
29252925
.slots = PySSLSocket_slots,
29262926
};
29272927

0 commit comments

Comments
 (0)