Skip to content
Permalink
Browse files Browse the repository at this point in the history
Removed possible command injection
  • Loading branch information
chieffancypants committed Jun 28, 2013
1 parent 7987544 commit e001e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/printer.js
Expand Up @@ -93,7 +93,7 @@ function printDirect(parameters){
}else if (!printer_helper.printDirect){// should be POSIX
var temp_file_name = path.join(os.tmpDir(),"printing");
fs.writeFileSync(temp_file_name, data);
child_process.exec('lpr -P'+printer+' -oraw -r'+' '+temp_file_name, function(err, stdout, stderr){
child_process.execFile('lpr', ['-P' + printer, '-oraw', '-r', temp_file_name], function(err, stdout, stderr){
if (err !== null) {
error('ERROR: ' + err);
return;
Expand Down

0 comments on commit e001e38

Please sign in to comment.