| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 08ff4a0 commit 4a6ca7a
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,9 +15,8 @@ | |||
| 15 | 15 | **/ | |
| 16 | 16 | namespace node { | |
| 17 | 17 | ||
| 18 | - #define SECURITY_REVERSIONS(XX) \ | ||
| 19 | - XX(CVE_2024_27980, "CVE-2024-27980", "Unsafe Windows batch file execution") | ||
| 20 | - // XX(CVE_2016_PEND, "CVE-2016-PEND", "Vulnerability Title") | ||
| 18 | + #define SECURITY_REVERSIONS(XX) \ | ||
| 19 | + // XX(CVE_2016_PEND, "CVE-2016-PEND", "Vulnerability Title") | ||
| 21 | 20 | ||
| 22 | 21 | enum reversion { | |
| 23 | 22 | #define V(code, ...) SECURITY_REVERT_##code, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -648,9 +648,8 @@ bool IsWindowsBatchFile(const char* filename) { | |||
| 648 | 648 | static constexpr bool kIsWindows = false; | |
| 649 | 649 | #endif // _WIN32 | |
| 650 | 650 | if (kIsWindows) | |
| 651 | - if (!IsReverted(SECURITY_REVERT_CVE_2024_27980)) | ||
| 652 | - if (const char* p = strrchr(filename, '.')) | ||
| 653 | - return StringEqualNoCase(p, ".bat") || StringEqualNoCase(p, ".cmd"); | ||
| 651 | + if (const char* p = strrchr(filename, '.')) | ||
| 652 | + return StringEqualNoCase(p, ".bat") || StringEqualNoCase(p, ".cmd"); | ||
| 654 | 653 | return false; | |
| 655 | 654 | } | |
| 656 | 655 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,24 +19,13 @@ const cp = require('child_process'); | |||
| 19 | 19 | const assert = require('assert'); | |
| 20 | 20 | const { isWindows } = common; | |
| 21 | 21 | ||
| 22 | - const arg = '--security-revert=CVE-2024-27980'; | ||
| 23 | - const isRevert = process.execArgv.includes(arg); | ||
| 24 | - | ||
| 25 | - const expectedCode = isWindows && !isRevert ? 'EINVAL' : 'ENOENT'; | ||
| 22 | + const expectedCode = isWindows ? 'EINVAL' : 'ENOENT'; | ||
| 26 | 23 | const expectedStatus = isWindows ? 1 : 127; | |
| 27 | 24 | ||
| 28 | 25 | const suffixes = | |
| 29 | 26 | 'BAT bAT BaT baT BAt bAt Bat bat CMD cMD CmD cmD CMd cMd Cmd cmd' | |
| 30 | 27 | .split(' '); | |
| 31 | 28 | ||
| 32 | - if (process.argv[2] === undefined) { | ||
| 33 | - const a = cp.spawnSync(process.execPath, [__filename, 'child']); | ||
| 34 | - const b = cp.spawnSync(process.execPath, [arg, __filename, 'child']); | ||
| 35 | - assert.strictEqual(a.status, 0); | ||
| 36 | - assert.strictEqual(b.status, 0); | ||
| 37 | - return; | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | 29 | function testExec(filename) { | |
| 41 | 30 | return new Promise((resolve) => { | |
| 42 | 31 | cp.exec(filename).once('exit', common.mustCall(function(status) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments