Skip to content

Commit 477aac9

Browse files
author
Sjoerd Tieleman
committed
Removed logging debug code. Changed "exec" to "execFile" to prevent shell injection.
1 parent c9c826c commit 477aac9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ var ConfigUtils = {
4040
},
4141

4242
rewriteDatabaseEntry: function(config) {
43-
console.log(config);
4443
if (typeof config.database == 'string') {
4544
config.database = {
4645
dialect: "sqlite",

lib/probe-handler.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ exports.doProbe = function(postData, callback) {
1313
var source_file = obj['source_file'];
1414

1515
if (source_file) {
16-
var the_process = child_process.exec(
17-
config['ffprobe'] + ' -print_format json -show_format -show_streams ' + source_file,
16+
var the_process = child_process.execFile(
17+
config['ffprobe'],
18+
['-print_format', 'json', '-show_format', '-show_streams', source_file],
1819
function didFinishProbing(error, stdout, stderr) {
1920
if (error) {
20-
callback("An error occurred while probing.", null);
21+
var lastMsg = error.message.trim().split("\n").pop();
22+
callback(lastMsg, null);
2123
} else {
2224
try {
2325
var probe = JSON.parse(stdout);

0 commit comments

Comments
 (0)