From: mkanat%bugzilla.org <> Date: Fri, 18 Jan 2008 11:04:19 +0000 (+0000) Subject: Bug 407402: Make Bugzilla die when data/params doesn't exist, if we're in a CGI. X-Git-Tag: bugzilla-3.1.3~388 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c8316b9f30ca3ab96b7e8acd1275253ae3e272f;p=thirdparty%2Fbugzilla.git Bug 407402: Make Bugzilla die when data/params doesn't exist, if we're in a CGI. Patch By Max Kanat-Alexander r=justdave, a=mkanat --- diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index b1b0d66675..d84970e8cf 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; }