diff options
author | Gervase Markham <gerv@mozilla.org> | 2015-01-21 20:49:57 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-01-21 20:49:57 +0100 |
commit | 4dabf1a9c679f06b3637d3c76e1e05aa83a6d259 (patch) | |
tree | 93ec377d81b16ad7caccc28c4954048358aa431b /showdependencygraph.cgi | |
parent | 367d9c2f6efd2cc53b773f0c1cc9e19a8d82c5be (diff) | |
download | bugzilla-4dabf1a9c679f06b3637d3c76e1e05aa83a6d259.tar.gz bugzilla-4dabf1a9c679f06b3637d3c76e1e05aa83a6d259.tar.xz |
Bug 1079065: [SECURITY] Always use the 3 arguments form for open() to prevent shell code injection
r=dylan,a=simon
Diffstat (limited to 'showdependencygraph.cgi')
-rwxr-xr-x | showdependencygraph.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 528b9cd61..d93c1c875 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -49,7 +49,7 @@ sub CreateImagemap { my $map = "<map name=\"imagemap\">\n"; my $default = ""; - open MAP, "<$mapfilename"; + open MAP, "<", $mapfilename; while(my $line = <MAP>) { if($line =~ /^default ([^ ]*)(.*)$/) { $default = qq{<area alt="" shape="default" href="$1">\n}; @@ -258,7 +258,7 @@ if ($webdotbase =~ /^https?:/) { error => $! }); binmode $pngfh; - open(DOT, "\"$webdotbase\" -Tpng $filename|"); + open(DOT, '-|', "\"$webdotbase\" -Tpng $filename"); binmode DOT; print $pngfh $_ while <DOT>; close DOT; @@ -287,7 +287,7 @@ if ($webdotbase =~ /^https?:/) { error => $! }); binmode $mapfh; - open(DOT, "\"$webdotbase\" -Tismap $filename|"); + open(DOT, '-|', "\"$webdotbase\" -Tismap $filename"); binmode DOT; print $mapfh $_ while <DOT>; close DOT; |