Skip to content

Commit 8f458b0

Browse files
kant2002breautek
andauthored
feat: Account for Node security patch (#1778)
As of https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2#command-injection-via-args-parameter-of-child_processspawn-without-shell-option-enabled-on-windows-cve-2024-27980---high Cordova produce unrecognized error on Windows. Fixes: apache/cordova-cli#456 --------- Co-authored-by: Norman Breau <norman@breautek.com>
1 parent eb0f002 commit 8f458b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/check_reqs.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ module.exports.get_gradle_wrapper = function () {
110110
let program_dir;
111111
// OK, This hack only works on Windows, not on Mac OS or Linux. We will be deleting this eventually!
112112
if (module.exports.isWindows()) {
113-
const result = execa.sync(path.join(__dirname, 'getASPath.bat'));
113+
// "shell" option enabled for CVE-2024-27980 (Windows) Mitigation
114+
// See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 for more details
115+
const result = execa.sync(path.join(__dirname, 'getASPath.bat'), { shell: true });
114116
// console.log('result.stdout =' + result.stdout.toString());
115117
// console.log('result.stderr =' + result.stderr.toString());
116118

0 commit comments

Comments
 (0)