summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-10-11 18:56:19 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-10-11 18:56:19 +0200
commit4d55f265b801efb52ea49abe3fcdc9c34c4763c2 (patch)
tree55fd684fc6db416e794a0bd917ab542aed9a1e41 /Bugzilla/Install
parent6b3849980cdc1fbb402b4894336d9050aa624059 (diff)
downloadbugzilla-4d55f265b801efb52ea49abe3fcdc9c34c4763c2.tar.gz
bugzilla-4d55f265b801efb52ea49abe3fcdc9c34c4763c2.tar.xz
Bug 550097: checksetup.pl should detect when run via a web server (cgi) and fail with a sane error
r/a=mkanat
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Util.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm
index 50cbfd2a8..14744ef8c 100644
--- a/Bugzilla/Install/Util.pm
+++ b/Bugzilla/Install/Util.pm
@@ -298,7 +298,7 @@ sub _wanted_languages {
# Checking SERVER_SOFTWARE is the same as i_am_cgi() in Bugzilla::Util.
if (exists $ENV{'SERVER_SOFTWARE'}) {
- my $cgi = Bugzilla->cgi;
+ my $cgi = eval { Bugzilla->cgi } || eval { require CGI; return CGI->new() };
$requested = $cgi->http('Accept-Language') || '';
my $lang = $cgi->cookie('LANG');
push(@wanted, $lang) if $lang;
@@ -504,6 +504,12 @@ sub vers_cmp {
@A <=> @B;
}
+sub no_checksetup_from_cgi {
+ print "Content-Type: text/html; charset=UTF-8\r\n\r\n";
+ print install_string('no_checksetup_from_cgi');
+ exit;
+}
+
######################
# Helper Subroutines #
######################