@@ -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.8.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.
@@ -459,6 +467,14 @@ functions.
459
467
*executable * parameter accepts a bytes and :term: `path-like object `
460
468
on Windows.
461
469
470
+ .. versionchanged :: 3.8.17
471
+
472
+ Changed Windows shell search order for ``shell=True ``. The current
473
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
474
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
475
+ malicious program named ``cmd.exe `` into a current directory no
476
+ longer works.
477
+
462
478
*stdin *, *stdout * and *stderr * specify the executed program's standard input,
463
479
standard output and standard error file handles, respectively. Valid values
464
480
are :data: `PIPE `, :data: `DEVNULL `, an existing file descriptor (a positive
@@ -1077,6 +1093,14 @@ calls these functions.
1077
1093
.. versionchanged :: 3.3
1078
1094
*timeout * was added.
1079
1095
1096
+ .. versionchanged :: 3.8.17
1097
+
1098
+ Changed Windows shell search order for ``shell=True ``. The current
1099
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1100
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1101
+ malicious program named ``cmd.exe `` into a current directory no
1102
+ longer works.
1103
+
1080
1104
.. function :: check_call(args, *, stdin=None, stdout=None, stderr=None, \
1081
1105
shell=False, cwd=None, timeout=None, \
1082
1106
**other_popen_kwargs)
@@ -1107,6 +1131,14 @@ calls these functions.
1107
1131
.. versionchanged :: 3.3
1108
1132
*timeout * was added.
1109
1133
1134
+ .. versionchanged :: 3.8.17
1135
+
1136
+ Changed Windows shell search order for ``shell=True ``. The current
1137
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1138
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1139
+ malicious program named ``cmd.exe `` into a current directory no
1140
+ longer works.
1141
+
1110
1142
1111
1143
.. function :: check_output(args, *, stdin=None, stderr=None, shell=False, \
1112
1144
cwd=None, encoding=None, errors=None, \
@@ -1162,6 +1194,14 @@ calls these functions.
1162
1194
.. versionadded :: 3.7
1163
1195
*text * was added as a more readable alias for *universal_newlines *.
1164
1196
1197
+ .. versionchanged :: 3.8.17
1198
+
1199
+ Changed Windows shell search order for ``shell=True ``. The current
1200
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1201
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1202
+ malicious program named ``cmd.exe `` into a current directory no
1203
+ longer works.
1204
+
1165
1205
1166
1206
.. _subprocess-replacements :
1167
1207
0 commit comments