Skip to content

Commit 029060c

Browse files
committedNov 20, 2024
deps: cross-spawn@7.0.6
1 parent 9350950 commit 029060c

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed
 

‎node_modules/cross-spawn/lib/enoent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function hookChildProcess(cp, parsed) {
2424
// the command exists and emit an "error" instead
2525
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
2626
if (name === 'exit') {
27-
const err = verifyENOENT(arg1, parsed, 'spawn');
27+
const err = verifyENOENT(arg1, parsed);
2828

2929
if (err) {
3030
return originalEmit.call(cp, 'error', err);

‎node_modules/cross-spawn/lib/util/escape.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ function escapeArgument(arg, doubleEscapeMetaChars) {
1515
arg = `${arg}`;
1616

1717
// Algorithm below is based on https://qntm.org/cmd
18+
// It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
19+
// Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
1820

1921
// Sequence of backslashes followed by a double quote:
2022
// double up all the backslashes and escape the double quote
21-
arg = arg.replace(/(\\*)"/g, '$1$1\\"');
23+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
2224

2325
// Sequence of backslashes followed by the end of the string
2426
// (which will become a double quote later):
2527
// double up all the backslashes
26-
arg = arg.replace(/(\\*)$/, '$1$1');
28+
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
2729

2830
// All other backslashes occur literally
2931

‎node_modules/cross-spawn/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cross-spawn",
3-
"version": "7.0.3",
3+
"version": "7.0.6",
44
"description": "Cross platform child_process#spawn and child_process#spawnSync",
55
"keywords": [
66
"spawn",
@@ -65,7 +65,7 @@
6565
"lint-staged": "^9.2.5",
6666
"mkdirp": "^0.5.1",
6767
"rimraf": "^3.0.0",
68-
"standard-version": "^7.0.0"
68+
"standard-version": "^9.5.0"
6969
},
7070
"engines": {
7171
"node": ">= 8"

‎package-lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5569,9 +5569,9 @@
55695569
}
55705570
},
55715571
"node_modules/cross-spawn": {
5572-
"version": "7.0.3",
5573-
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
5574-
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
5572+
"version": "7.0.6",
5573+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
5574+
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
55755575
"inBundle": true,
55765576
"license": "MIT",
55775577
"dependencies": {

0 commit comments

Comments
 (0)
Please sign in to comment.