summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2000-12-06 07:36:25 +0100
committergerv%gerv.net <>2000-12-06 07:36:25 +0100
commit8e7c07a12c3512f3be60231e3c68c1ebbaa366af (patch)
tree0bbe713659d91392f2ced1f6775f1aa527c90800
parenta1e8485ef53e7dcab07bae5c2ddc9d0c94a97ffb (diff)
downloadbugzilla-8e7c07a12c3512f3be60231e3c68c1ebbaa366af.tar.gz
bugzilla-8e7c07a12c3512f3be60231e3c68c1ebbaa366af.tar.xz
Bug 6682: moving location of graph creation dir to graphs instead of data/mining, for security reasons.
-rwxr-xr-xcollectstats.pl8
-rwxr-xr-xreports.cgi9
2 files changed, 9 insertions, 8 deletions
diff --git a/collectstats.pl b/collectstats.pl
index 145838014..9d813f63e 100755
--- a/collectstats.pl
+++ b/collectstats.pl
@@ -32,10 +32,10 @@ use vars @::legal_product;
require "globals.pl";
# tidy up after graphing module
-chdir("data/mining");
-unlink <*.gif>;
-unlink <*.png>;
-chdir("../..");
+chdir("graphs");
+unlink <./*.gif>;
+unlink <./*.png>;
+chdir("..");
ConnectToDatabase(1);
GetVersionTable();
diff --git a/reports.cgi b/reports.cgi
index d6a38c0ea..0287e07ff 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -49,6 +49,7 @@ require "globals.pl";
use vars qw(@legal_product); # globals from er, globals.pl
my $dir = "data/mining";
+my $graph_dir = "graphs";
my @status = qw (NEW ASSIGNED REOPENED);
my %bugsperperson;
@@ -500,10 +501,10 @@ FIN
my $type = chart_image_type();
my $data_file = daily_stats_filename($FORM{product});
my $image_file = chart_image_name($data_file, $type);
- my $url_image = "$dir/" . url_quote($image_file);
+ my $url_image = "$graph_dir/" . url_quote($image_file);
- if (! -e "$dir/$image_file") {
- generate_chart("$dir/$data_file", "$dir/$image_file", $type);
+ if (! -e "$graph_dir/$image_file") {
+ generate_chart("$dir/$data_file", "$graph_dir/$image_file", $type);
}
print <<FIN;
@@ -586,7 +587,7 @@ sub generate_chart {
if (! defined $line[$i] or $line[$i] eq '') {
# no data point given, don't plot (this will probably
# generate loads of Chart::Base warnings, but that's not
- # our fault.
+ # our fault.)
push @{$data{$field}}, undef;
}
else {