fix exploit that enabled IPC

This commit is contained in:
Olivier Gagnon 2021-10-15 19:13:05 -04:00
parent 58650c5895
commit 45c46ce2a0
3 changed files with 7 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -646,6 +646,11 @@ export function runScriptFromScript(
return 0; return 0;
} }
args = args.map((arg) => {
if (typeof arg === "number") return arg;
return arg + ""; // force cast to string
});
// Check if the script is already running // Check if the script is already running
const runningScriptObj = server.getRunningScript(scriptname, args); const runningScriptObj = server.getRunningScript(scriptname, args);
if (runningScriptObj != null) { if (runningScriptObj != null) {