]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
7 months ago[3.9] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754...
Petr Viktorin [Thu, 3 Apr 2025 16:27:33 +0000 (18:27 +0200)] 
[3.9] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) (GH-131412)

Email generators using email.policy.default may convert an RFC 2047
encoded-word to unencoded form during header refolding. In a structured
header, this could allow 'specials' chars outside a quoted-string,
leading to invalid address headers and enabling spoofing. This change
ensures a parsed encoded-word that contains specials is kept as an
encoded-word while the header is refolded.

[Better fix from @bitdancer.]

(cherry picked from commit 295b53df2aa18deb625a7da41f7e4babfe6ef34b)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: R David Murray <rdmurray@bitdance.com>
8 months ago[3.9] gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed...
Miss Islington (bot) [Wed, 19 Feb 2025 13:36:40 +0000 (14:36 +0100)] 
[3.9] gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed URLs (GH-129418) (#129530)

(cherry picked from commit d89a5f6a6e65511a5f6e0618c4c30a7aa5aba56a)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
8 months ago[3.9] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#130248)
Hugo van Kemenade [Wed, 19 Feb 2025 13:31:01 +0000 (15:31 +0200)] 
[3.9] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#130248)

The IMAP4 client could consume an arbitrary amount of memory when trying
to connect to a malicious server, because it read a "literal" data with a
single read(size) call, and BufferedReader.read() allocates the bytes
object of the specified size before reading. Now the IMAP4 client reads data
by chunks, therefore the amount of used memory is limited by the
amount of the data actually been sent by the server.
(cherry picked from commit 735f25c5e3a0f74438c86468ec4dfbe219d93c91)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
8 months ago[3.9] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-129171) (GH-129440) (#130075)
Miss Islington (bot) [Wed, 19 Feb 2025 13:23:10 +0000 (14:23 +0100)] 
[3.9] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-129171) (GH-129440) (#130075)

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit 45db419c3104a14007ea9efbc4bff03aef8ed10c)
(cherry picked from commit e94dbe4ed83460f18bd72563c5f09f6cdc71f604)
(cherry picked from commit c750061047ee520d8299334df4b112fd983d7e48)
(cherry picked from commit cbfe3023e46b544b80ea1a38a8c900c6fb881554)

---

Restore the skipUnless removed by GH-119465.

This test can only pass on virtual machines, not actual machines.
Actual machines see:

```
    self.cli.connect((cid, VSOCKPORT))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device
```

Reproduced on (Linux) Ubuntu 24.04.1 running 6.8.0-52-generic.

(cherry picked from commit 2bd9f9b0547f6ffe40cd1dd964459ce11b58144d)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
8 months ago[3.9] gh-122544: Change OS image in GitHub Actions to Ubuntu 22.04 (#122566) (#130295)
Hugo van Kemenade [Wed, 19 Feb 2025 13:20:20 +0000 (15:20 +0200)] 
[3.9] gh-122544: Change OS image in GitHub Actions to Ubuntu 22.04 (#122566) (#130295)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
8 months ago[3.9] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (#130275)
Miss Islington (bot) [Wed, 19 Feb 2025 08:53:20 +0000 (09:53 +0100)] 
[3.9] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (#130275)

Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
8 months ago[3.9] gh-129641: Docs GHA build: use upload-artifact@v4 (GH-129642) (#130114)
Petr Viktorin [Tue, 18 Feb 2025 09:15:37 +0000 (10:15 +0100)] 
[3.9] gh-129641: Docs GHA build: use upload-artifact@v4 (GH-129642) (#130114)

Co-authored-by: shallow-beach <96891913+shallow-beach@users.noreply.github.com>
fix (#128077)

8 months ago[3.9] gh-129509: Add required key to the dummy Read the Docs config file (GH-129510...
Miss Islington (bot) [Tue, 18 Feb 2025 09:07:09 +0000 (10:07 +0100)] 
[3.9] gh-129509: Add required key to the dummy Read the Docs config file (GH-129510) (#130249)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
9 months ago[3.9] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#128117)
Petr Viktorin [Thu, 23 Jan 2025 15:55:08 +0000 (16:55 +0100)] 
[3.9] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#128117)

Make `versionchanged:: next`` expand to current (unreleased) version.

When a new CPython release is cut, the release manager will replace
all such occurences of "next" with the just-released version.
(See the issue for release-tools and devguide PRs.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 7d24ea9db3e8fdca52058629c9ba577aba3d8e5c)

gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)

(cherry-picked from e349f73a5ad2856b0a7cbe4aef7cc081c7aed777)
(cherry-picked from 3.11: f0895aa9c1d40d0add673cc51bd143556e22100a)
(cherry-picked from 3.10: 8773554b717cfb08b4bd11a927813f4ed74762c7)

11 months agoPost 3.9.21
Łukasz Langa [Tue, 3 Dec 2024 18:25:02 +0000 (19:25 +0100)] 
Post 3.9.21

11 months agoPython 3.9.21 v3.9.21
Łukasz Langa [Tue, 3 Dec 2024 17:50:13 +0000 (18:50 +0100)] 
Python 3.9.21

11 months ago[3.9] gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 (GH...
Łukasz Langa [Tue, 3 Dec 2024 17:42:19 +0000 (18:42 +0100)] 
[3.9] gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 (GH-122793) (GH-123819) (GH-127571)

Make IPv4-mapped IPv6 address properties consistent with IPv4.
(cherry picked from commit 76a1c5d18312712baed4699fe7333abb050ec9b7)
(cherry picked from commit b58da409aac90123c1159916908a4c49144925ee)

Co-authored-by: Seth Michael Larson <seth@python.org>
11 months ago[3.9] gh-95588: Drop the safety claim from `ast.literal_eval` docs. (GH-95919) (GH...
Miss Islington (bot) [Tue, 3 Dec 2024 16:08:42 +0000 (17:08 +0100)] 
[3.9] gh-95588: Drop the safety claim from `ast.literal_eval` docs. (GH-95919) (GH-126729)

It was never really safe and this claim conflicts directly with the big warning in the docs about it being able to crash the interpreter.
(cherry picked from commit 8baef8ae367041a5cfefb40b19c7b87e9bcb56a2)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
11 months ago[3.9] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792...
Seth Michael Larson [Mon, 2 Dec 2024 15:07:24 +0000 (09:07 -0600)] 
[3.9] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) (GH-126800)

(cherry picked from commit 3c9996909402fadc98e6ca2a64e75a71a7427352)

11 months ago[3.9] gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are...
Victor Stinner [Mon, 2 Dec 2024 12:36:46 +0000 (13:36 +0100)] 
[3.9] gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format (#103849) (#126976)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 29f348e232e82938ba2165843c448c2b291504c5)

Co-authored-by: JohnJamesUtley <81572567+JohnJamesUtley@users.noreply.github.com>
11 months ago[3.9] gh-127359: Pin Tcl/Tk to 8 (8.6) for testing macOS (GH-127365) (#127409)
Hugo van Kemenade [Sat, 30 Nov 2024 16:38:35 +0000 (18:38 +0200)] 
[3.9] gh-127359: Pin Tcl/Tk to 8 (8.6) for testing macOS (GH-127365) (#127409)

11 months ago[3.9] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-126477)
Petr Viktorin [Tue, 12 Nov 2024 09:26:31 +0000 (10:26 +0100)] 
[3.9] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-126477)

Determine the support of the Kyiv timezone by checking the result of
astimezone() which uses the system tz database and not the one
populated by zoneinfo.

(cherry picked from commit 931d7e052e22aa01e18fcc67ed71b6ea305aff71)

12 months ago[3.9] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (GH-125107)
Miss Islington (bot) [Mon, 4 Nov 2024 15:17:48 +0000 (16:17 +0100)] 
[3.9] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (GH-125107)

Use a longer key: FIPS mode requires at least of at least 112 bits.
The previous key was only 32 bits.

(cherry picked from commit e091b9f20fa8e409003af79f3c468b8225e6dcd3)
(cherry picked from commit f7bfac4b3dd30920f97a542fd78c355ce62aa267)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 months ago[3.9] gh-124651: Quote template strings in `venv` activation scripts (GH-124712)...
Victor Stinner [Mon, 4 Nov 2024 15:16:35 +0000 (16:16 +0100)] 
[3.9] gh-124651: Quote template strings in `venv` activation scripts (GH-124712) (GH-126185) (GH-126269) (GH-126301)

(cherry picked from commit ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97)

12 months ago[3.9] gh-125041: gh-90781: test_zlib: For s390x HW acceleration, skip checking the...
Petr Viktorin [Mon, 28 Oct 2024 12:50:42 +0000 (13:50 +0100)] 
[3.9] gh-125041: gh-90781: test_zlib: For s390x HW acceleration, skip checking the compressed bytes (GH-125042) (#125587)

This backports two commits:

- GH-31096 skipped the tests unconditionally
- GH-125042 skips only the possibly-failing assertion

(cherry picked from commit d522856)

12 months ago[3.9] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don...
Petr Viktorin [Mon, 28 Oct 2024 12:50:27 +0000 (13:50 +0100)] 
[3.9] gh-107902: gh-108948: Don't test setting suid/sgid/sticky on systems that don't support them (GH-108368) (GH-109697) (#125576)

On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.

Co-authored-by: Victor Stinner <vstinner@python.org>
12 months ago[3.9] gh-89452: GHA: Set --with-dbmliborder to avoid issues with homebrew's gdbm...
Petr Viktorin [Wed, 9 Oct 2024 14:06:08 +0000 (16:06 +0200)] 
[3.9] gh-89452: GHA: Set --with-dbmliborder to avoid issues with homebrew's gdbm 1.24 (GH-125112) (#125176)

Per https://github.com/python/cpython/issues/89452GH-issuecomment-1116329316,
the issue is fixed in configure for 3.11+, and

> For older Python versions, the workaround is to build with:
>
>     ./configure --with-dbmliborder=gdbm:ndbm

We need this workaround in GitHub Actions, otherwise the tests fail.
(cherry picked from commit 850189a64e7f0b920fe48cb12a5da3e648435680)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
12 months ago[3.9] gh-100454: Fix running SSL tests with OpenSSL 3.1+ (GH-100456) (GH-125186)
Miss Islington (bot) [Wed, 9 Oct 2024 13:41:22 +0000 (15:41 +0200)] 
[3.9] gh-100454: Fix running SSL tests with OpenSSL 3.1+ (GH-100456) (GH-125186)

This fixes Ubuntu pipeline with OpenSSL 3.1+

(cherry picked from commit 333c7dccd87c637d0b15cf81f9bbec28e39664fd)

Co-authored-by: Dimitri John Ledkov <19779+xnox@users.noreply.github.com>
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
14 months agoPost 3.9.20.
Łukasz Langa [Fri, 6 Sep 2024 20:34:30 +0000 (22:34 +0200)] 
Post 3.9.20.

14 months agoPython 3.9.20 v3.9.20
Łukasz Langa [Fri, 6 Sep 2024 19:03:56 +0000 (21:03 +0200)] 
Python 3.9.20

14 months ago[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr(...
Petr Viktorin [Fri, 6 Sep 2024 11:13:54 +0000 (13:13 +0200)] 
[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123769)

Detect email address parsing errors and return empty tuple to
indicate the parsing error (old API). Add an optional 'strict'
parameter to getaddresses() and parseaddr() functions. Patch by
Thomas Dwyer.

(cherry picked from commit 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-Authored-By: Thomas Dwyer <github@tomd.tel>
14 months ago[3.9] gh-123678: Upgrade libexpat 2.6.3 (#123711)
Seth Michael Larson [Thu, 5 Sep 2024 12:27:48 +0000 (07:27 -0500)] 
[3.9] gh-123678: Upgrade libexpat 2.6.3 (#123711)

(cherry picked from commit fdc04ad75a410ed3af99edfc32c38b5fc3375f52)

14 months ago[3.9] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with...
Serhiy Storchaka [Thu, 5 Sep 2024 12:05:43 +0000 (15:05 +0300)] 
[3.9] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) (#119027)

(cherry picked from commit e237b25a4fa5626fcd1b1848aa03f725f892e40e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
14 months ago[3.9] gh-112275: Fix HEAD_LOCK deadlock in child process after fork (GH-112336) ...
Łukasz Langa [Wed, 4 Sep 2024 20:41:03 +0000 (22:41 +0200)] 
[3.9] gh-112275: Fix HEAD_LOCK deadlock in child process after fork (GH-112336) (#123688)

HEAD_LOCK is called from _PyEval_ReInitThreads->_PyThreadState_DeleteExcept before _PyRuntimeState_ReInitThreads reinit runtime->interpreters.mutex which might be locked before fork.

(cherry picked from commit 522799a05e3e820339718151ac055af6d864d463)

Co-authored-by: ChuBoning <102216855+ChuBoning@users.noreply.github.com>
14 months ago[3.9] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.Create...
Miss Islington (bot) [Wed, 4 Sep 2024 16:22:50 +0000 (18:22 +0200)] 
[3.9] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events (GH-119735) (#123679)

(cherry picked from commit 2e861ac1cd4359463f6a13efd3d3578fce71e5ab)

Co-authored-by: Steve Dower <steve.dower@python.org>
14 months ago[3.9] gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with...
Miss Islington (bot) [Wed, 4 Sep 2024 15:49:40 +0000 (17:49 +0200)] 
[3.9] gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes (GH-123075) (#123107)

This fixes CVE-2024-7592.
(cherry picked from commit 44e458357fca05ca0ae2658d62c8c595b048b5ef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.9] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) (...
Jason R. Coombs [Wed, 4 Sep 2024 15:46:48 +0000 (11:46 -0400)] 
[3.9] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) (#123432)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286d78d328c2f575e0b05b16fe447d1656d6)
(cherry picked from commit 17b77bb41409259bad1cd6c74761c18b6ab1e860)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
14 months ago[3.9] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123641)
Seth Michael Larson [Wed, 4 Sep 2024 15:46:01 +0000 (10:46 -0500)] 
[3.9] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123641)

* Remove backtracking when parsing tarfile headers
* Rewrite PAX header parsing to be stricter
* Optimize parsing of GNU extended sparse headers v0.0

(cherry picked from commit 34ddb64d088dd7ccc321f6103d23153256caa5d4)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
14 months ago[3.9] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233...
Łukasz Langa [Wed, 4 Sep 2024 15:39:02 +0000 (17:39 +0200)] 
[3.9] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122610)

Per RFC 2047:

> [...] these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.

This should fail for custom fold() implementations that aren't careful
about newlines.

(cherry picked from commit 097633981879b3c9de9a1dd120d3aa585ecc2384)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
15 months ago[3.9] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload...
Miss Islington (bot) [Fri, 2 Aug 2024 13:10:52 +0000 (15:10 +0200)] 
[3.9] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (GH-122508)

(cherry picked from commit f071f01b7b7e19d7d6b3a4b0ec62f820ecb14660)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months ago[3.9] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback...
Miss Islington (bot) [Tue, 30 Jul 2024 12:44:26 +0000 (14:44 +0200)] 
[3.9] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (#122428)

Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

(cherry picked from commit 78df1043dbdce5c989600616f9f87b4ee72944e5)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months ago[3.9] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122120)
Łukasz Langa [Mon, 22 Jul 2024 11:49:47 +0000 (13:49 +0200)] 
[3.9] gh-121957: Emit audit events for python -i and python -m asyncio (GH-122120)

17 months ago[3.9] gh-112769: test_zlib: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with...
Ned Deily [Thu, 30 May 2024 16:36:05 +0000 (12:36 -0400)] 
[3.9] gh-112769: test_zlib: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int suffix (GH-112771) (GH-119566)

zlib-ng defines the version as "1.3.0.zlib-ng".

(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok miro@hroncok.cz
17 months ago[3.9] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118741)
Steve Dower [Fri, 24 May 2024 17:27:01 +0000 (18:27 +0100)] 
[3.9] gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) (GH-118741)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
17 months ago[3.9] gh-114572: Fix locking in cert_store_stats and get_ca_certs (#118109)
Seth Michael Larson [Fri, 10 May 2024 11:46:12 +0000 (06:46 -0500)] 
[3.9] gh-114572: Fix locking in cert_store_stats and get_ca_certs (#118109)

18 months ago[3.9] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179...
Petr Viktorin [Tue, 7 May 2024 09:57:58 +0000 (11:57 +0200)] 
[3.9] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177) (GH-118472)

The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).

This patch updates the ranges with what was missing or otherwise
incorrect.

100.64.0.0/10 is left alone, for now, as it's been made special in [1].

The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.

[1] https://github.com/python/cpython/issues/61602

In 3.10 and below, is_private checks whether the network and broadcast
address are both private.
In later versions (where the test wss backported from), it checks
whether they both are in the same private network.

For 0.0.0.0/0, both 0.0.0.0 and 255.225.255.255 are private,
but one is in 0.0.0.0/8 ("This network") and the other in
255.255.255.255/32 ("Limited broadcast").

---------

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
18 months ago[3.9] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (GH-118187)
Seth Michael Larson [Tue, 7 May 2024 08:50:48 +0000 (03:50 -0500)] 
[3.9] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (GH-118187)

(cherry picked from commit c9829eec0883a8991ea4d319d965e123a3cf6c20)

18 months ago[3.9] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) ...
Miss Islington (bot) [Tue, 7 May 2024 08:48:03 +0000 (10:48 +0200)] 
[3.9] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (GH-118005)

(cherry picked from commit a4b44d39cd6941cc03590fee7538776728bdfd0a)

Co-authored-by: Steve Dower <steve.dower@python.org>
19 months ago[3.9] gh-116773: Fix overlapped memory corruption crash (GH-116774) (GH-117080)
jkriegshauser [Wed, 27 Mar 2024 15:24:46 +0000 (08:24 -0700)] 
[3.9] gh-116773: Fix overlapped memory corruption crash (GH-116774) (GH-117080)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
19 months ago[3.9] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117247)
Miss Islington (bot) [Wed, 27 Mar 2024 13:45:22 +0000 (14:45 +0100)] 
[3.9] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117247)

This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix.  When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing.

(cherry picked from commit 9f74e86c78853c101a23e938f8e32ea838d8f62e)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
19 months agoPost 3.9.19
Łukasz Langa [Tue, 19 Mar 2024 16:18:11 +0000 (17:18 +0100)] 
Post 3.9.19

19 months agoPython 3.9.19 v3.9.19
Łukasz Langa [Tue, 19 Mar 2024 15:48:02 +0000 (16:48 +0100)] 
Python 3.9.19

19 months ago[3.9] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210) ...
Miss Islington (bot) [Tue, 19 Mar 2024 10:53:42 +0000 (11:53 +0100)] 
[3.9] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210) (GH-116068)

Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason.  Proxy bypass lists are strictly name based.  Most implementations of proxy support agree.
(cherry picked from commit c43b26d02eaa103756c250e8d36829d388c5f3be)

Co-authored-by: Weii Wang <weii.wang@canonical.com>
20 months ago[3.9] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-11562...
Sebastian Pipping [Wed, 6 Mar 2024 23:03:30 +0000 (00:03 +0100)] 
[3.9] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (GH-116272)

Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:

- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`

Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 .

Includes code suggested-by: Snild Dolkow <snild@sony.com>
and by core dev Serhiy Storchaka.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
20 months ago[3.9] gh-107077: Raise SSLCertVerificationError even if the error is set via SSL_ERRO...
Miss Islington (bot) [Wed, 21 Feb 2024 16:02:34 +0000 (17:02 +0100)] 
[3.9] gh-107077: Raise SSLCertVerificationError even if the error is set via SSL_ERROR_SYSCALL (GH-107586) (#107590)

(cherry picked from commit 77e09192b5f1caf14cd5f92ccb53a4592e83e8bc)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
20 months ago[3.9] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115474)
Seth Michael Larson [Wed, 21 Feb 2024 12:48:13 +0000 (06:48 -0600)] 
[3.9] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115474)

Manual backport due to code differences.
(cherry picked from commit e071b0d558b2f5cddd5a9fc6afadb4ba109ec77e)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
20 months ago[3.9] gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400)...
Miss Islington (bot) [Wed, 21 Feb 2024 11:45:14 +0000 (12:45 +0100)] 
[3.9] gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400) (GH-115763)

Doc/library/xml.rst: Document CVE-2023-52425 under "XML vulnerabilities"
(cherry picked from commit fbd40ce46e7335a5dbaf48a3aa841be22d7302ba)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
20 months ago[3.9] Fix tests for XMLPullParser with Expat 2.6.0 (GH-115133) (GH-115535)
Seth Michael Larson [Wed, 21 Feb 2024 11:22:55 +0000 (05:22 -0600)] 
[3.9] Fix tests for XMLPullParser with Expat 2.6.0 (GH-115133) (GH-115535)

Feeding the parser by too small chunks defers parsing to prevent
CVE-2023-52425. Future versions of Expat may be more reactive.
(cherry picked from commit 4a08e7b3431cd32a0daf22a33421cd3035343dc4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
20 months ago[3.9] gh-97032: avoid test_squeezer crash on macOS buildbots (GH-115508) (#115655)
Miss Islington (bot) [Wed, 21 Feb 2024 11:17:44 +0000 (12:17 +0100)] 
[3.9] gh-97032: avoid test_squeezer crash on macOS buildbots (GH-115508) (#115655)

(cherry picked from commit 17a6533dbf5ffdfd707c1514a61423d9ac59a9cb)

Co-authored-by: Ned Deily <nad@python.org>
20 months ago[3.9] gh-115349: Pin theme to fix code snippets (GH-115351)
Hugo van Kemenade [Tue, 13 Feb 2024 12:56:59 +0000 (14:56 +0200)] 
[3.9] gh-115349: Pin theme to fix code snippets (GH-115351)

Pin theme to fix code snippets

20 months ago[3.9] Add missing sections to blurbs (GH-114553) (GH-115339)
Miss Islington (bot) [Tue, 13 Feb 2024 12:56:31 +0000 (13:56 +0100)] 
[3.9] Add missing sections to blurbs (GH-114553) (GH-115339)

(cherry picked from commit dc8893af7df706138161d82ce7d1d2f9132d14f9)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
21 months ago[3.9] gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877) (GH-115087)
Łukasz Langa [Tue, 6 Feb 2024 15:08:31 +0000 (16:08 +0100)] 
[3.9] gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877) (GH-115087)

(cherry picked from commit 618d7256e78da8200f6e2c6235094a1ef885dca4)

Co-authored-by: Zachary Ware <zach@python.org>
21 months ago[3.9] gh-113659: Skip hidden .pth files (GH-113660) (GH-114146)
Serhiy Storchaka [Wed, 17 Jan 2024 14:28:17 +0000 (16:28 +0200)] 
[3.9] gh-113659: Skip hidden .pth files (GH-113660) (GH-114146)

(cherry picked from commit 74208ed0c440244fb809d8acc97cb9ef51e888e3)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
21 months ago[3.9] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (GH...
Miss Islington (bot) [Wed, 17 Jan 2024 14:10:35 +0000 (15:10 +0100)] 
[3.9] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (GH-114184)

(cherry picked from commit 9dbfe2dc8e7bba25e52f9470ae6969821a365297)

Co-authored-by: Victor Stinner <vstinner@python.org>
21 months ago[3.9] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022...
Adam Turner [Wed, 17 Jan 2024 13:48:31 +0000 (13:48 +0000)] 
[3.9] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022) (GH-114039)

(cherry picked from commit 94b1d1fa38ada8cf7d196184a04a195c152eed75)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
21 months ago[3.9] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) (GH-113915)
Miss Islington (bot) [Wed, 17 Jan 2024 13:48:06 +0000 (14:48 +0100)] 
[3.9] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) (GH-113915)

Raise BadZipFile when try to read an entry that overlaps with other entry or
central directory.
(cherry picked from commit 66363b9a7b9fe7c99eba3a185b74c5fdbf842eba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
21 months ago[3.9] gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup (GH-99930...
Serhiy Storchaka [Wed, 17 Jan 2024 13:47:47 +0000 (15:47 +0200)] 
[3.9] gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup (GH-99930) (GH-112842)

(cherry picked from commit 81c16cd94ec38d61aa478b9a452436dc3b1b524d)

Co-authored-by: Søren Løvborg <sorenl@unity3d.com>
21 months ago[3.9] bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) (GH...
Miss Islington (bot) [Wed, 17 Jan 2024 13:47:26 +0000 (14:47 +0100)] 
[3.9] bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) (GH-112600)

* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
(cherry picked from commit 0daf555c6fb3feba77989382135a58215e1d70a5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
21 months ago[3.9] gh-109991: Update Windows build to use OpenSSL 1.1.1w (GH-111265)
Zachary Ware [Wed, 17 Jan 2024 13:47:09 +0000 (07:47 -0600)] 
[3.9] gh-109991: Update Windows build to use OpenSSL 1.1.1w (GH-111265)

(cherry picked from commit dcb16c98be61630369227f0d893f8d9262d25cac)

Co-authored-by: Steve Dower <steve.dower@python.org>
21 months ago[3.9] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests...
Ned Deily [Wed, 17 Jan 2024 13:46:46 +0000 (08:46 -0500)] 
[3.9] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w and 3.0.11. (GH-110008)

(cherry picked from commit c88037d137a98d7c399c7bd74d5117b5bcae1543)

21 months ago[3.9] Fix documentation build by pinning Alabaster version to 0.7.13 (#113815)
Maciej Olko [Wed, 10 Jan 2024 09:35:38 +0000 (10:35 +0100)] 
[3.9] Fix documentation build by pinning Alabaster version to 0.7.13 (#113815)

Alabaster is Sphinx's dependency. Alabaster 0.7.14 released on 2024-01-08 dropped support for Sphinx 3.3 and earlier.

https://alabaster.readthedocs.io/en/latest/changelog.html

23 months ago[3.9] gh-112160: Add 'regen-configure' make target (#112164)
Seth Michael Larson [Wed, 6 Dec 2023 23:26:24 +0000 (17:26 -0600)] 
[3.9] gh-112160: Add 'regen-configure' make target (#112164)

Add 'regen-configure' make target

2 years ago[3.9] gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out...
Łukasz Langa [Mon, 6 Nov 2023 17:44:50 +0000 (18:44 +0100)] 
[3.9] gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695) (gh-111780)

(cherry picked from commit c8faa3568afd255708096f6aa8df0afa80cf7697)

Co-authored-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
2 years ago[3.9] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109008)
Miss Islington (bot) [Wed, 6 Sep 2023 18:01:05 +0000 (11:01 -0700)] 
[3.9] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109008)

Output with one wheel:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl.
Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
Actual digest:   7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel.
```

Output with two wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip.

::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip.
```

Output without wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=::Could not find a pip wheel on disk.
```
(cherry picked from commit f8a047941f2e4a1848700c21d58a08c9ec6a9c68)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.9] CI: Bump GitHub Actions (GH-108879) (#108893)
Hugo van Kemenade [Tue, 5 Sep 2023 20:39:06 +0000 (14:39 -0600)] 
[3.9] CI: Bump GitHub Actions (GH-108879) (#108893)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.9] [3.10] Add a dummy .rtfd.yml file to silence invalid failing webhooks (GH-10890...
Miss Islington (bot) [Tue, 5 Sep 2023 15:37:59 +0000 (08:37 -0700)] 
[3.9] [3.10] Add a dummy .rtfd.yml file to silence invalid failing webhooks (GH-108908) (#108925)

(cherry picked from commit 5970435b26fc85c83490bc915c894ea7dd0fbf21)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agoPost 3.9.18
Łukasz Langa [Thu, 24 Aug 2023 19:18:58 +0000 (21:18 +0200)] 
Post 3.9.18

2 years agoPython 3.9.18 v3.9.18
Łukasz Langa [Thu, 24 Aug 2023 17:51:41 +0000 (19:51 +0200)] 
Python 3.9.18

2 years agoFix invalid string escape
Łukasz Langa [Thu, 24 Aug 2023 17:44:27 +0000 (19:44 +0200)] 
Fix invalid string escape

2 years ago[3.9] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) (#108407)
Łukasz Langa [Thu, 24 Aug 2023 10:09:11 +0000 (12:09 +0200)] 
[3.9] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) (#108407)

* In preauth tests of test_ssl, explicitly break reference cycles
  invoving SingleConnectionTestServerThread to make sure that the
  thread is deleted. Otherwise, the test marks the environment as
  altered because the threading module sees a "dangling thread"
  (SingleConnectionTestServerThread). This test leak was introduced
  by the test added for the fix of issue gh-108310.
* Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds
  timeout.
* SingleConnectionTestServerThread.run() catchs TimeoutError
* Fix a race condition (missing synchronization) in
  test_preauth_data_to_tls_client(): the server now waits until the
  client connect() completed in call_after_accept().
* test_https_client_non_tls_response_ignored() calls server.join()
  explicitly.
* Replace "localhost" with server.listener.getsockname()[0].
(cherry picked from commit 592bacb6fc0833336c0453e818e9b95016e9fd47)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.9] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) (#108351)
Miss Islington (bot) [Wed, 23 Aug 2023 10:10:49 +0000 (03:10 -0700)] 
[3.9] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) (#108351)

Explicitly break a reference cycle when SSLSocket._create() raises an
exception. Clear the variable storing the exception, since the
exception traceback contains the variables and so creates a reference
cycle.

This test leak was introduced by the test added for the fix of GH-108310.
(cherry picked from commit 64f99350351bc46e016b2286f36ba7cd669b79e3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.9] gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1...
Ned Deily [Tue, 22 Aug 2023 18:28:57 +0000 (14:28 -0400)] 
[3.9] gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (#108123)

[3.9] gh-107565: Update multissltests and GitHub CI workflows to use  OpenSSL 1.1.1v, 3.0.10, and 3.1.2.

(cherry picked from commit 441797d4ffb12acda257370b9e5e19ed8d6e8a71)

2 years ago[3.9] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (#108274)
Petr Viktorin [Tue, 22 Aug 2023 18:28:10 +0000 (20:28 +0200)] 
[3.9] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (#108274)

(cherry picked from commit acbd3f9c5c5f23e95267714e41236140d84fe962)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2 years ago[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613...
Serhiy Storchaka [Tue, 22 Aug 2023 18:25:15 +0000 (21:25 +0300)] 
[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224) (#107231)

Previously *consumed was not set in this case.
(cherry picked from commit f08e52ccb027f6f703302b8c1a82db9fd3934270).
(cherry picked from commit b8b3e6afc0a48c3cbb7c36d2f73e332edcd6058c)

2 years ago[3.9] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108320)
Łukasz Langa [Tue, 22 Aug 2023 17:57:10 +0000 (19:57 +0200)] 
[3.9] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108320)

gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw

Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake
and included protections (like certificate verification) and treating sent
unencrypted data as if it were post-handshake TLS encrypted data.

The vulnerability is caused when a socket is connected, data is sent by the
malicious peer and stored in a buffer, and then the malicious peer closes the
socket within a small timing window before the other peers’ TLS handshake can
begin. After this sequence of events the closed socket will not immediately
attempt a TLS handshake due to not being connected but will also allow the
buffered data to be read as if a successful TLS handshake had occurred.

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2 years ago[3.9] CI: Bump macOS build to use OpenSSL v3.0 (GH-105538) (#105871)
Erlend E. Aasland [Wed, 5 Jul 2023 11:20:44 +0000 (13:20 +0200)] 
[3.9] CI: Bump macOS build to use OpenSSL v3.0 (GH-105538) (#105871)

(cherry picked from commit 34e93d3998bab8acd651c50724eb1977f4860a08)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.9] [3.11] Add single value `agen.athrow(value)` signature to the 3.11 docs gh...
Miss Islington (bot) [Wed, 5 Jul 2023 11:18:49 +0000 (04:18 -0700)] 
[3.9] [3.11] Add single value `agen.athrow(value)` signature to the 3.11 docs gh-105269  (GH-105468) (#105477)

(cherry picked from commit acf3916e84158308660ed07c474a564e045d6884)

Co-authored-by: Federico Caselli <CaselIT@users.noreply.github.com>
2 years agoPost 3.9.17
Łukasz Langa [Tue, 6 Jun 2023 12:17:01 +0000 (14:17 +0200)] 
Post 3.9.17

2 years agoPython 3.9.17 v3.9.17
Łukasz Langa [Tue, 6 Jun 2023 09:32:53 +0000 (11:32 +0200)] 
Python 3.9.17

2 years ago[3.9] gh-105184: document that marshal functions can fail and need to be checked...
Miss Islington (bot) [Mon, 5 Jun 2023 15:42:16 +0000 (08:42 -0700)] 
[3.9] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105221)

(cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years ago[3.9] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) (GH-10520...
Gregory P. Smith [Mon, 5 Jun 2023 15:41:51 +0000 (08:41 -0700)] 
[3.9] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) (GH-105200) (#105205)

Upgrade builds to OpenSSL 1.1.1u.

Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9.

Manual edits to the _ssl_data_300.h file prevent it from removing any
existing definitions in case those exist in some peoples builds and were
important (avoiding regressions during backporting).

(cherry picked from commit ede89af)

Co-authored-by: Ned Deily <nad@python.org>
2 years ago[3.9] Update GitHub CI workflow for macOS. (GH-105303)
Ned Deily [Mon, 5 Jun 2023 06:23:32 +0000 (02:23 -0400)] 
[3.9] Update GitHub CI workflow for macOS. (GH-105303)

2 years ago[3.9] gh-68966: fix versionchanged in docs (GH-105298)
Ned Deily [Mon, 5 Jun 2023 03:56:15 +0000 (23:56 -0400)] 
[3.9] gh-68966: fix versionchanged in docs (GH-105298)

2 years ago[3.9] gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508...
Miss Islington (bot) [Mon, 22 May 2023 10:42:37 +0000 (03:42 -0700)] 
[3.9] gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508) (GH-104575) (GH-104592) (#104593)

gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508)

`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit GH-25595.

This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).

I simplified the docs by eliding the state of the world explanatory
paragraph in this security release only backport.  (people will see
that in the mainline /3/ docs)

(cherry picked from commit 2f630e1ce18ad2e07428296532a68b11dc66ad10)
(cherry picked from commit 610cc0ab1b760b2abaac92bd256b96191c46b941)
(cherry picked from commit f48a96a28012d28ae37a2f4587a780a5eb779946)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2 years ago[3.9] gh-99889: Fix directory traversal security flaw in uu.decode() (GH-104096)...
Miss Islington (bot) [Mon, 22 May 2023 10:41:30 +0000 (03:41 -0700)] 
[3.9] gh-99889: Fix directory traversal security flaw in uu.decode() (GH-104096) (#104331)

(cherry picked from commit 0aeda297931820436a50b78f4f7f0597274b5df4)

Co-authored-by: Sam Carroll <70000253+samcarroll42@users.noreply.github.com>
2 years ago[3.9] gh-104049: do not expose on-disk location from SimpleHTTPRequestHandler (GH...
Miss Islington (bot) [Mon, 22 May 2023 10:40:50 +0000 (03:40 -0700)] 
[3.9] gh-104049: do not expose on-disk location from SimpleHTTPRequestHandler (GH-104067) (#104120)

Do not expose the local server's on-disk location from `SimpleHTTPRequestHandler` when generating a directory index. (unnecessary information disclosure)

(cherry picked from commit c7c3a60c88de61a79ded9fdaf6bc6a29da4efb9a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.9] gh-103935: Use `io.open_code()` when executing code in trace and profile module...
Steve Dower [Mon, 22 May 2023 10:40:30 +0000 (11:40 +0100)] 
[3.9] gh-103935: Use `io.open_code()` when executing code in trace and profile modules (GH-103947) (#103953)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2 years ago[3.9] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) (...
Petr Viktorin [Mon, 15 May 2023 16:53:58 +0000 (18:53 +0200)] 
[3.9] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) (#104382)

Backport of c8c3956d905e019101038b018129a4c90c9c9b8f

2 years ago[3.9] GH-102126: fix deadlock at shutdown when clearing thread states (GH-102222... 104073/head
Kumar Aditya [Tue, 28 Mar 2023 08:55:36 +0000 (14:25 +0530)] 
[3.9] GH-102126: fix deadlock at shutdown when clearing thread states (GH-102222) (#102236)

(cherry picked from commit 5f11478ce7fda826d399530af4c5ca96c592f144)

2 years ago[3.9] gh-101997: Update bundled pip version to 23.0.1 (GH-101998). (#102243)
Pradyun Gedam [Tue, 28 Mar 2023 08:52:56 +0000 (09:52 +0100)] 
[3.9] gh-101997: Update bundled pip version to 23.0.1 (GH-101998). (#102243)

(cherry picked from commit 89d9ff0f48c51a85920c7372a7df4a2204e32ea5)

2 years ago[3.9] gh-102627: Replace address pointing toward malicious web page (GH-102630) ...
Miss Islington (bot) [Mon, 13 Mar 2023 23:28:36 +0000 (16:28 -0700)] 
[3.9] gh-102627: Replace address pointing toward malicious web page (GH-102630) (GH-102666)

(cherry picked from commit 61479d46848bc7a7f9b571b0b09c4a4b4436d839)

Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.9] gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727) (GH-101751)
Steve Dower [Tue, 7 Mar 2023 23:01:22 +0000 (23:01 +0000)] 
[3.9] gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727) (GH-101751)

Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Ned Deily <nad@python.org>
2 years ago[3.9] gh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI i… (#102094)
Dong-hee Na [Tue, 21 Feb 2023 16:33:23 +0000 (01:33 +0900)] 
[3.9] gh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI i… (#102094)

[3.9] gh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI issue (gh-102079)

2 years ago[3.9] gh-101283: Improved fallback logic for subprocess with shell=True on Windows...
Miss Islington (bot) [Thu, 9 Feb 2023 09:59:40 +0000 (01:59 -0800)] 
[3.9] gh-101283: Improved fallback logic for subprocess with shell=True on Windows (GH-101286) (#101709)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2 years agogh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (GH-101424)
Miss Islington (bot) [Mon, 30 Jan 2023 18:21:08 +0000 (10:21 -0800)] 
gh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (GH-101424)

(cherry picked from commit ea232716d3de1675478db3a302629ba43194c967)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>