From: mkanat%bugzilla.org <> Date: Fri, 18 Jan 2008 11:05:04 +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.0.4~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=034d1e375d6e5bc9283383fe0b2f43056020ae75;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 85c9d6decb..11ffe4d9ac 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -315,6 +315,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; }