| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
start (GH-6195) (GH-6339)
(cherry picked from commit da1734c58d2f97387ccc9676074717d38b044128)
|
| |
|
|
| |
executing user code) with a live exception set. (GH-3992)
|
| |
|
|
|
| |
(GH-6111)
(cherry picked from commit e32bbaf376a09c149fa7c7f2919d7c9ce4e2a055)
|
| |
|
|
|
|
|
|
|
| |
(GH-6026). (GH-6074) (GH-6076)
(cherry picked from commit 26c9f565d016db21257a60d29ab2c99383dd5ac7)
(cherry picked from commit 04aadf23eac51fec2e436c5960c1362bbb7d03de)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
The regex to decode a number in fpformat is susceptible to catastrophic backtracking. This is a potential DOS vector if a server is using fpformat on untrusted number strings.
Replace it with an equivalent non-vulnerable regex. The match behavior of the new regex is slightly different. It captures the whole integer part of the number in one group, Leading zeros are stripped off later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Prevent low-grade poplib REDOS (CVE-2018-1060)
The regex to test a mail server's timestamp is susceptible to
catastrophic backtracking on long evil responses from the server.
Happily, the maximum length of malicious inputs is 2K thanks
to a limit introduced in the fix for CVE-2013-1752.
A 2KB evil response from the mail server would result in small slowdowns
(milliseconds vs. microseconds) accumulated over many apop calls.
This is a potential DOS vector via accumulated slowdowns.
Replace it with a similar non-vulnerable regex.
The new regex is RFC compliant.
The old regex was non-compliant in edge cases.
* Prevent difflib REDOS (CVE-2018-1061)
The default regex for IS_LINE_JUNK is susceptible to
catastrophic backtracking.
This is a potential DOS vector.
Replace it with an equivalent non-vulnerable regex.
Also introduce unit and REDOS tests for difflib.
Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)
|
| |
|
| |
(cherry picked from commit d7773d92bd11640a8c950d6c36a9cef1cee36f96)
|
| |
|
|
|
| |
SSLContext.load_dh_params() now supports non-ASCII path.
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
| |
Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change
TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to
make them pass on Debian.
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
| |
Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)
Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
|
| |
|
|
|
|
|
|
|
|
|
| |
SSND chunk is not found (GH-5240) (GH-5781)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)
|
| |
|
| |
strop is highly legacy and can be safely compiled out in most installations. Let's not fail the test suite for its absence.
|
| |
|
|
|
|
|
|
|
| |
(GH-4570) (#5493)
instead of crashing due to a stack overflow.
This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad243c965d4432b4e93884064001a2607)
|
| |
|
|
|
|
|
|
|
| |
(GH-5429)
_test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a
timeout of 1 second on Queue.get(), instead of 0.1 second, for slow
buildbots.
(cherry picked from commit 8f6eeaf21cdf4aea25fdefeec814a1ce07453fe9)
|
| |
|
|
|
| |
test_subprocess.test_leaking_fds_on_error() failed when the PATH
environment variable contains a path to an existing file. Fix the
test: ignore also ENOTDIR, not only ENOENT and EACCES.
|
| |
|
|
| |
This test doesn't care about order, the underlying filesystem APIs do not
guarantee directory listings on subsequent calls will be in the same order.
|
| |
|
| |
(cherry picked from commit 7d91c0250408e202243c77c1dc9afdb321b6b32f)
|
| |
|
|
|
|
|
| |
(#5169)
See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath
Paths that begin with `\\?\` are "extended-length paths".
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Multiple threads iterating over a file can corrupt the file's internal readahead
buffer resulting in crashes. To fix this, cache buffer state thread-locally for
the duration of a file_iternext call and only update the file's internal state
after reading completes.
No attempt is made to define or provide "reasonable" semantics for iterating
over a file on multiple threads. (Non-crashing) races are still
present. Duplicated, corrupt, and missing data will happen.
This was originally fixed by 6401e5671781eb217ee1afb4603cc0d1b0367ae6, which
raised an exception from seek() and next() when concurrent operations were
detected. Alas, this simpler solution breaks legitimate use cases such as
capturing the standard streams when multiple threads are logging.
|
| |
|
|
|
| |
(GH-5078). (#5084)
(cherry picked from commit 7cc42c356b0dc5ad9eaa9392789e84bd4aa1c7de)
|
| |
|
|
| |
Move other test to more proper place.
(cherry picked from commit e8ed96550c6aa9a1e39c36e67e892994e25e2c41)
|
| |
|
|
|
| |
(GH-4991). (#5017)
(cherry picked from commit 53f9135667226f33e049e327db60fb033afbd77a)
|
| | |
|
| |
|
| |
(cherry picked from commit b748e3b2586e44bfc7011b601bce9cc6d16d89f1)
|
| |
|
|
|
| |
netrc file format doesn't support quotes and escapes.
See https://linux.die.net/man/5/netrc
|
| |
|
|
| |
expressions in Py3k mode. (GH-4579) (#4676)
|
| |
|
| |
Remove a flakey test and rewrite another one for readability.
|
| |
|
| |
(cherry picked from commit cc55e78acab93a495c974b9a2ea71c8bb9cc2f5d)
|
| |
|
|
|
|
|
| |
(#4623)
characters/bytes for non-negative n. This makes it compatible with
read() methods of other file-like objects.
(cherry picked from commit 219c2de5ad0fdac825298bed1bb251f16956c04a)
|
| |
|
| |
(cherry picked from commit afd055a59fe0291881fc2459215ce106e424da51)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31324: Optimize support._match_test() (#4421)
* Rename support._match_test() to support.match_test(): make it
public
* Remove support.match_tests global variable. It is replaced with a
new support.set_match_tests() function, so match_test() doesn't
have to check each time if patterns were modified.
* Rewrite match_test(): use different code paths depending on the
kind of patterns for best performances.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 803ddd8ce22f0de3ab42fb98a225a704c000ef06)
* bpo-31324: Fix test.support.set_match_tests(None) (#4505)
(cherry picked from commit bb11c3c967afaf263e00844d4ab461b7fafd6d36)
(cherry picked from commit 70b2f8797146a56a6880743424f0bedf4fc30c62)
|
| |
|
|
|
|
|
|
|
| |
Fix the following warning:
Warning -- files was modified by test_builtin
Before: []
After: ['@test_19422_tmp']
1 test altered the execution environment:
test_builtin
|
| |
|
| |
Replace python3 with python2.
|
| |
|
|
| |
threads. (#3672)
|
| |
|
| |
select.kevent objects are now comparable with other objects in Python 2.
|
| |
|
|
|
|
| |
Define __hash__() in test_functools and test_itertools to fix the
following warning:
DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
|
| |
|
|
| |
(GH-3201) (#3951)
|
| |
|
| |
(cherry picked from commit a7723d8b09f516a2b75837a3527b8cc7bee89fad)
|
| |
|
|
|
| |
(GH-4220) (#4222)
(cherry picked from commit 4f469c096628af730b17798d0ebfd8925bfde836)
|
| |
|
| |
(cherry picked from commit 894ebd065e02debf20c0657d26020ecc42b7534f)
|
| |
|
|
|
| |
bpo-31910: test_create_connection() now catchs also EADDRNOTAVAIL to
fix the test on Travis CI.
(cherry picked from commit 280c22a82a6756e9caffef031c564fd98f1b50e7)
|
| |
|
| |
(cherry picked from commit baac01e629d90f63dfde6b5cc433f4bc65c5feeb)
|
| |
|
|
|
|
|
| |
test_curses now saves/restores signals. On FreeBSD, the curses module
sets handlers of some signals, but don't restore old handlers when
the module is deinitialized.
(cherry picked from commit 19f68301a1295a9c30d9f28b8f1479cdcccd75aa)
|
| |
|
|
|
|
| |
rejecting (GH-4158) (#4163)
separators that are not bytes-like objects..
(cherry picked from commit a2314283ff87c65e1745a42c2f2b716b1a209128)
|
| |
|
|
|
| |
OpenBSD. (GH-4111). (#4112)
(cherry picked from commit f52dff611cff2fb9e90340b4787eda50ab2d40c6)
|
| |
|
|
|
|
| |
custom integers. (GH-3947) (#4088)
Bad remainder in divmod() in intermediate calculations caused an assertion failure..
(cherry picked from commit 4ffd4653a7ec9c97775472276cf5e159e2366bb2)
|
| |
|
| |
(cherry picked from commit bcbdd2f8db396c3f0ec9186162b39b5a34effa0e)
|
| | |
|