@@ -111,6 +111,14 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
111
111
Added the *text * parameter, as a more understandable alias of *universal_newlines *.
112
112
Added the *capture_output * parameter.
113
113
114
+ .. versionchanged :: 3.9.17
115
+
116
+ Changed Windows shell search order for ``shell=True ``. The current
117
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
118
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
119
+ malicious program named ``cmd.exe `` into a current directory no
120
+ longer works.
121
+
114
122
.. class :: CompletedProcess
115
123
116
124
The return value from :func: `run `, representing a process that has finished.
@@ -468,6 +476,14 @@ functions.
468
476
*executable * parameter accepts a bytes and :term: `path-like object `
469
477
on Windows.
470
478
479
+ .. versionchanged :: 3.9.17
480
+
481
+ Changed Windows shell search order for ``shell=True ``. The current
482
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
483
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
484
+ malicious program named ``cmd.exe `` into a current directory no
485
+ longer works.
486
+
471
487
*stdin *, *stdout * and *stderr * specify the executed program's standard input,
472
488
standard output and standard error file handles, respectively. Valid values
473
489
are :data: `PIPE `, :data: `DEVNULL `, an existing file descriptor (a positive
@@ -1126,6 +1142,14 @@ calls these functions.
1126
1142
.. versionchanged :: 3.3
1127
1143
*timeout * was added.
1128
1144
1145
+ .. versionchanged :: 3.9.17
1146
+
1147
+ Changed Windows shell search order for ``shell=True ``. The current
1148
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1149
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1150
+ malicious program named ``cmd.exe `` into a current directory no
1151
+ longer works.
1152
+
1129
1153
.. function :: check_call(args, *, stdin=None, stdout=None, stderr=None, \
1130
1154
shell=False, cwd=None, timeout=None, \
1131
1155
**other_popen_kwargs)
@@ -1158,6 +1182,14 @@ calls these functions.
1158
1182
.. versionchanged :: 3.3
1159
1183
*timeout * was added.
1160
1184
1185
+ .. versionchanged :: 3.9.17
1186
+
1187
+ Changed Windows shell search order for ``shell=True ``. The current
1188
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1189
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1190
+ malicious program named ``cmd.exe `` into a current directory no
1191
+ longer works.
1192
+
1161
1193
1162
1194
.. function :: check_output(args, *, stdin=None, stderr=None, shell=False, \
1163
1195
cwd=None, encoding=None, errors=None, \
@@ -1213,6 +1245,14 @@ calls these functions.
1213
1245
.. versionadded :: 3.7
1214
1246
*text * was added as a more readable alias for *universal_newlines *.
1215
1247
1248
+ .. versionchanged :: 3.9.17
1249
+
1250
+ Changed Windows shell search order for ``shell=True ``. The current
1251
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1252
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1253
+ malicious program named ``cmd.exe `` into a current directory no
1254
+ longer works.
1255
+
1216
1256
1217
1257
.. _subprocess-replacements :
1218
1258
0 commit comments