+10
-8
lines changedFilter options
+10
-8
lines changed Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ function hookChildProcess(cp, parsed) {
24
24
// the command exists and emit an "error" instead
25
25
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
26
26
if (name === 'exit') {
27
-
const err = verifyENOENT(arg1, parsed, 'spawn');
27
+
const err = verifyENOENT(arg1, parsed);
28
28
29
29
if (err) {
30
30
return originalEmit.call(cp, 'error', err);
Original file line number Diff line number Diff line change
@@ -15,15 +15,17 @@ function escapeArgument(arg, doubleEscapeMetaChars) {
15
15
arg = `${arg}`;
16
16
17
17
// 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
18
20
19
21
// Sequence of backslashes followed by a double quote:
20
22
// 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\\"');
22
24
23
25
// Sequence of backslashes followed by the end of the string
24
26
// (which will become a double quote later):
25
27
// double up all the backslashes
26
-
arg = arg.replace(/(\\*)$/, '$1$1');
28
+
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
27
29
28
30
// All other backslashes occur literally
29
31
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "cross-spawn",
3
-
"version": "7.0.3",
3
+
"version": "7.0.6",
4
4
"description": "Cross platform child_process#spawn and child_process#spawnSync",
5
5
"keywords": [
6
6
"spawn",
@@ -65,7 +65,7 @@
65
65
"lint-staged": "^9.2.5",
66
66
"mkdirp": "^0.5.1",
67
67
"rimraf": "^3.0.0",
68
-
"standard-version": "^7.0.0"
68
+
"standard-version": "^9.5.0"
69
69
},
70
70
"engines": {
71
71
"node": ">= 8"
Original file line number Diff line number Diff line change
@@ -6396,9 +6396,9 @@
6396
6396
}
6397
6397
},
6398
6398
"node_modules/cross-spawn": {
6399
-
"version": "7.0.3",
6400
-
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
6401
-
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
6399
+
"version": "7.0.6",
6400
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
6401
+
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
6402
6402
"inBundle": true,
6403
6403
"license": "MIT",
6404
6404
"dependencies": {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4