]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH...
authorSeth Michael Larson <seth@python.org>
Mon, 29 Jul 2024 21:44:35 +0000 (16:44 -0500)
committerGitHub <noreply@github.com>
Mon, 29 Jul 2024 21:44:35 +0000 (14:44 -0700)
commit78df1043dbdce5c989600616f9f87b4ee72944e5
tree20f92525f43536e120fe1f934dc1a20f31cce366
parent76bdfa4cd02532519fb43ae91244e2b4b3650d78
gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134)

* 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).

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/socket.py
Lib/test/test_socket.py
Misc/NEWS.d/next/Security/2024-07-22-13-11-28.gh-issue-122133.0mPeta.rst [new file with mode: 0644]