From 7df754ddfd010881d89074bfd0f8c4fde51dd150 Mon Sep 17 00:00:00 2001 From: Mufeed VH Date: Sat, 4 Apr 2020 02:09:36 +0530 Subject: [PATCH] Fixed Command Injection --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 626181d..f712e18 100755 --- a/src/index.js +++ b/src/index.js @@ -60,7 +60,7 @@ const dig = function dig(args = [], options = {}) { const raw = (options.raw === true) ? options.raw : args.includes('+short'); const digCMD = options.dig || 'dig'; return new Promise((resolve, reject) => { - const process = child.spawn(digCMD, args); + const process = child.execFile(digCMD, args.split(' ')); let shellOutput = ''; process.stdout.on('data', (chunk) => {