]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 28 Sep 2022 23:46:11 +0000 (16:46 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Sep 2022 23:46:11 +0000 (16:46 -0700)
commit94582bb643f98bc58b1ff206d1d2a56f97c3a7e5
tree4e8fa98dc2f7ca0b905d7c8efa25bbfb00711973
parent7d60d10b6342f3fa7af1a65a6eba10d49945e769
gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613)

Fix a shell code injection vulnerability in the
get-remote-certificate.py example script. The script no longer uses a
shell to run "openssl" commands. Issue reported and initial fix by
Caleb Shortt.

Remove the Windows code path to send "quit" on stdin to the "openssl
s_client" command: use DEVNULL on all platforms instead.

Co-authored-by: Caleb Shortt <caleb@rgauge.com>
(cherry picked from commit 83a0f44ffd8b398673ae56c310cf5768d359c341)

Co-authored-by: Victor Stinner <vstinner@python.org>
Misc/NEWS.d/next/Security/2022-09-28-12-10-57.gh-issue-97612.y6NvOQ.rst [new file with mode: 0644]
Tools/scripts/get-remote-certificate.py