]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-97612: Fix shell injection in get-remote-certificate.py (#97613)
authorVictor Stinner <vstinner@python.org>
Wed, 28 Sep 2022 23:17:27 +0000 (01:17 +0200)
committerGitHub <noreply@github.com>
Wed, 28 Sep 2022 23:17:27 +0000 (01:17 +0200)
commit83a0f44ffd8b398673ae56c310cf5768d359c341
tree957adec00fc1c4da195392455dc9536d146996f2
parenta5f092f3c469b674b8d9ccbd4e4377230c9ac7cf
gh-97612: Fix shell injection in get-remote-certificate.py (#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>
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