mirror of
https://github.com/github/codeql.git
synced 2026-03-17 04:56:58 +01:00
Merge pull request #13152 from github/max-schaefer/unsafe-shell-command-construction-examples-sync
JavaScript: Use synchronous APIs in examples for js/shell-command-constructed-from-input.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
var cp = require("child_process");
|
||||
|
||||
module.exports = function download(path, callback) {
|
||||
cp.exec("wget " + path, callback);
|
||||
cp.execSync("wget " + path, callback);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var cp = require("child_process");
|
||||
|
||||
module.exports = function download(path, callback) {
|
||||
cp.execFile("wget", [path], callback);
|
||||
cp.execFileSync("wget", [path], callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user