| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport of TLS 1.3 related fixes from 3.7.
Misc fixes and workarounds for compatibility with OpenSSL 1.1.1 from git
master and TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by
default. Some test cases only apply to TLS 1.2.
OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS
1.3. The feature is enabled by default for maximum compatibility with
broken middle boxes. Users should be able to disable the hack and CPython's test suite needs
it to verify default options
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2a4ee8aa01d61b6a9c8e9c65c211e61bdb471826)
|
| |
|
|
|
|
|
|
|
| |
The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE,
OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except
for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3)
are set by default. The initial cipher suite list contains only
HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).
(cherry picked from commit 358cfd426ccc0fcd6a7940d306602138e76420ae)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
distribution points with empty DP or URI correctly. A malicious or buggy
certificate can result into segfault.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue35746
(cherry picked from commit a37f52436f9aa4b9292878b72f3ff1480e2606c3)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
| |
(GH-11127)
|
| |
|
|
|
| |
(GH-11175) (GH-11249)
(cherry picked from commit 842acaab1376c5c84fd5966bb6070e289880e1ca)
|
| |
|
|
|
|
|
| |
"dll" would leak if an error occurred in _validate_paramflags() or
GenericPyCData_new().
(cherry picked from commit d77d97c9a1f593fe161afab97e2a3e2292ab88b9)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-11033) (GH-11234)
In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.
In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.
In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b53560b3867844472ae381fb3f858760621)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
| |
PyCArg_repr(). (GH-10853)
Use "ll" instead of the nonstandard "q".
(cherry picked from commit 062cbb67726f26794b1b461853e40696b4a0b220)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
| |
Include <pyconfig.h> ealier in Modules/expat/xmlparse.c to define
properly _POSIX_C_SOURCE and _XOPEN_SOURCE.
|
| |
|
|
|
|
|
|
|
| |
Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define
properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L,
whereas <features.h> (included indirectly by <string.h>) defines
_POSIX_C_SOURCE as 199506L.
(cherry picked from commit cf247359d5b7082044eea1fa94b5211a172b1ff6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
exceptions. (GH-8113). (GH-10946) (GH-10955)
(cherry picked from commit 5b25f1d03100e2283c1b129d461ba68ac0169a14)
(cherry picked from commit 1de91a0032fed500ddd3d8c4fb7a38c0b8719f67)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>.
|
| |
|
|
|
|
| |
(cherry picked from commit 735abadd5bd91db4a9e6f4311969b0afacca0a1a)
Co-Authored-By: Segev Finer <segev208@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
They can be exposed when some C API calls fail due to lack of
memory.
* Failed Py_BuildValue() could cause an assertion error in the
following TextIOWrapper.tell().
* initvalue could leak in StringIO.__getstate__() after failed
PyDict_Copy().
(cherry picked from commit fdb5a50ef34f7951c3b01eb77b1359725a9ad670)
|
| |
|
|
|
| |
(cherry picked from commit a2e3585e79c93b2372dbad46a744e28fcc6dad6d)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-10617)
Fixes assertion failures in _datetimemodule.c
introduced in the previous fix (see bpo-31752).
Rather of trying to handle an int subclass as exact int,
let it to use overridden special methods, but check the
result of divmod().
(cherry picked from commit 3ec0f495163da3b7a15deb2805cec48aed432f58)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
"single" needs to be decrefed if PyList_Append() fails.
(cherry picked from commit 4c596d54aa6a55e9d2a3db78891e656ebbfb63c8)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
| |
This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.
(cherry picked from commit 7a69cf47a9bbc95f95fd67c982bff121b2a903cb)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
|
| |
|
|
|
|
|
|
| |
match `setup.py` (GH-10293)
This could cause compile errors on macOS or other platforms..
(cherry picked from commit 318ab63c01f5b8e7562b122ab5ba01258a51277b)
Co-authored-by: Max Bélanger <aeromax@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-10217)
_io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range
value to the bitwise struct field.
(cherry picked from commit b08746bfdf64e55ce33516f2065fa2aa4f51be95)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
|
| |
|
|
|
| |
(GH-10218)
(cherry picked from commit 53835e92d315340444e3dd083b3f69a590b00e07)
|
| | |
|
| |
|
|
|
| |
Based on the investigation by Xiang Zhang.
(cherry picked from commit df13df41a25765d8a39a77220691698498e758d4)
|
| |
|
|
|
|
|
| |
Don't leak a reference if PyDict_Update() fails, check the
PyList_New() call in treebuilder_new(), and properly handle failures
in xmlparser().
(cherry picked from commit 9f3ed3e213b30059087d059a7d1d3b2527fa8654)
|
| |
|
|
|
| |
(cherry picked from commit 68def052dcd41313eff2bd9f269e22c5a941db4d)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(GH-9258) (GH-9425)
Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f00ce48631c7140f33ba242496aaf7102b)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue34623
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Include ``openssl/dh.h`` header file to fix implicit function declaration of ``DH_free()``.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>.
(cherry picked from commit b3a271fc0ce3e13e427be8914decfc205a220ca8)
Co-authored-by: Alexandru Ardelean <ardeleanalex@gmail.com>
https://bugs.python.org/issue34710
|
| |
|
|
|
|
| |
Reported by Svace static analyzer.
(cherry picked from commit 6f82bffd2df63a4072b3f0483cdbe93ddedb87e9)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
|
| |
|
|
| |
It was backported in 0cc43df05e36655220468953e838169966b94ebd.
|
| |
|
|
|
| |
(cherry picked from commit b9bf9d025e659b5a1963027eb73690e57cb35dd0)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
| |
_collections.deque with a bad __new__(). (GH-9179)
|
| |
|
|
|
| |
(cherry picked from commit 5033aa77aacaa5505636f150e8d54baac5bdca9c)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
| |
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize..
(cherry picked from commit 0e0bc4e221f592f305d335faf5f8046484eb9238)
Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
|
| | |
|
| |
|
|
| |
(GH-8785)
|
| |
|
|
|
| |
(cherry picked from commit 2ebd3813af9172fe1f9b2f6004edf6f1e1e5d9f1)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix compilation warning in _ctypes module on Window
(cherry picked from commit 20f11fe43c47b68c8b9dd6539d2d40b66c9957f9)
* Fix compilation warnings on Windows 64-bit
(cherry picked from commit 725e4212229bf68f87d4f66c1815d444ddfc7aa5)
* Fix compiler warning in unicodeobject.c
Explicitly case to Py_UNICODE to fix the warning:
Objects\unicodeobject.c(4225): warning C4244: '=' :
conversion from 'long' to 'Py_UNICODE', possible loss of data
The downcast cannot overflow since we check that value <= 0x10ffff.
|
| |
|
| |
Use a local scope for the 'i' variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
AMD64 (GH-168) (GH-8625)
Fixed bpo-29565: Corrected ctypes passing of large structs by value.
Added code and test to check that when a structure passed by value
is large enough to need to be passed by reference, a copy of the
original structure is passed. The callee updates the passed-in value,
and the test verifies that the caller's copy is unchanged. A similar
change was also added to the test added for bpo-20160 (that test was
passing, but the changes should guard against regressions).
(cherry picked from commit a86339b83fbd0932e0529a3c91935e997a234582)
|
| | |
|
| |
|
|
| |
int in PySlice_GetIndices (GH-8480)
|
| | |
|
| |
|
|
|
|
|
| |
(GH-8337)
There was a missing check for integer overflow, several function calls
were not checked for failure, and allocated memory was not freed if an
error occurred.
|
| |
|
|
|
|
|
|
|
| |
exception set (GH-8282). (GH-8312) (GH-8314)
(cherry picked from commit 28f07364f066792ceee93231dbb80ae8ad98b2bb)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>.
(cherry picked from commit cc13016658a9ed86d0b702ab6c251ad5952a952f)
|
| |
|
|
|
| |
(cherry picked from commit 504373c59b48f1ea12132d515459022730db6047)
Also backport tests for skipitem() and handling errors.
|
| |
|
|
|
| |
(cherry picked from commit 7762e4d3872818272800dfbd8e1d8e3a689eb8f2)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
| |
(cherry picked from commit d6d4432724b12efc0d280b8eb80bca0deb8d4323)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
| |
(cherry picked from commit b4588c2fffbda91e4c2f0cf2b0fc3d14def95608)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
| |
(GH-3918). (GH-8013)
(cherry picked from commit 23db935bcf258657682e66464bf8512def8af830)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|