summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-01-18 12:04:19 +0100
committermkanat%bugzilla.org <>2008-01-18 12:04:19 +0100
commit2c8316b9f30ca3ab96b7e8acd1275253ae3e272f (patch)
tree55a18ef0900a4e2cbbfb6472a71a2db6431d5cdd
parent47d78d46b86fcf78724252db680213ffb372823b (diff)
downloadbugzilla-2c8316b9f30ca3ab96b7e8acd1275253ae3e272f.tar.gz
bugzilla-2c8316b9f30ca3ab96b7e8acd1275253ae3e272f.tar.xz
Bug 407402: Make Bugzilla die when data/params doesn't exist, if we're in a CGI.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=mkanat
-rw-r--r--Bugzilla/Config.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index b1b0d6667..d84970e8c 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -318,6 +318,17 @@ sub read_param_file {
# Now read the param back out from the sandbox
%params = %{$s->varglob('param')};
}
+ elsif ($ENV{'SERVER_SOFTWARE'}) {
+ # We're in a CGI, but the params file doesn't exist. We can't
+ # Template Toolkit, or even install_string, since checksetup
+ # might not have thrown an error. Bugzilla::CGI->new
+ # hasn't even been called yet, so we manually use CGI::Carp here
+ # so that the user sees the error.
+ require CGI::Carp;
+ CGI::Carp->import('fatalsToBrowser');
+ die "The $datadir/params file does not exist."
+ . ' You probably need to run checksetup.pl.',
+ }
return \%params;
}