]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-146139: Disable `socketpair` authentication on WASI (GH-146140) (#148527)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 13 Apr 2026 21:30:52 +0000 (23:30 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2026 21:30:52 +0000 (21:30 +0000)
commitd82c491b2ebb8fa952efa1dfddb2e873d867ccb2
treee1fca3c12ce2a61ee7f355dd7dd54bc715462726
parent26105b03a62226be112e3362c5435afe66797da5
[3.13] gh-146139: Disable `socketpair` authentication on WASI (GH-146140) (#148527)

gh-146139: Disable `socketpair` authentication on WASI (GH-146140)

Calling `connect(2)` on a non-blocking socket on WASI may leave the socket in a
"connecting" but not yet "connected" state.  In the former case, calling
`getpeername(2)` on it will fail, leading to an unhandled exception in Python.
(cherry picked from commit a5b76d53bb29afd864243f44ef22968f6385dfa0)

Co-authored-by: Joel Dice <joel.dice@akamai.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
Lib/socket.py