Skip to content

Commit

Permalink
Merge pull request #1 from toufik-airane/master
Browse files Browse the repository at this point in the history
Fix OS Command Injection on Jison
  • Loading branch information
JamieSlome authored Jun 16, 2020
2 parents bcf986e + 6ea9dcc commit 979a6ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ports/csharp/Jison/Jison/csharp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs'),
util = require('util'),
exec = require('child_process').exec,
execFile = require('child_process').execFile,
path = require('path');

GLOBAL.convertToSyntax = function (types, body) {
Expand All @@ -16,7 +16,7 @@ function puts(error, stdout, stderr) {

console.log("Executing: " + "jison " + process.argv[2]);

exec("jison " + process.argv[2], function (error) {
execFile("jison", [process.argv[2]], function (error) {
if (error) {
console.log(error);
return;
Expand Down
4 changes: 2 additions & 2 deletions ports/php/php.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs'),
util = require('util'),
exec = require('child_process').exec,
execFile = require('child_process').execFile,
path = require('path');

GLOBAL.convertToSyntax = function (types, body) {
Expand All @@ -16,7 +16,7 @@ function puts(error, stdout, stderr) {

console.log("Executing: " + "jison " + process.argv[2]);

exec("jison " + process.argv[2], function (error) {
execFile("jison", [process.argv[2]], function (error) {
if (error) {
console.log(error);
return;
Expand Down

0 comments on commit 979a6ef

Please sign in to comment.