Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4d55f265
Commit
4d55f265
authored
Oct 11, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 550097: checksetup.pl should detect when run via a web server (cgi) and fail with a sane error
r/a=mkanat
parent
6b384998
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
Util.pm
Bugzilla/Install/Util.pm
+7
-1
checksetup.pl
checksetup.pl
+3
-0
strings.txt.pl
template/en/default/setup/strings.txt.pl
+25
-0
No files found.
Bugzilla/Install/Util.pm
View file @
4d55f265
...
...
@@ -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 #
######################
...
...
checksetup.pl
View file @
4d55f265
...
...
@@ -60,6 +60,9 @@ use Bugzilla::Install::Util qw(install_string get_version_and_os
# Live Code
######################################################################
# Do not run checksetup.pl from the web browser.
Bugzilla::Install::Util::
no_checksetup_from_cgi
()
if
$ENV
{
'SERVER_SOFTWARE'
};
# When we're running at the command line, we need to pick the right
# language before ever displaying any string.
init_console
();
...
...
template/en/default/setup/strings.txt.pl
View file @
4d55f265
...
...
@@ -337,6 +337,31 @@ WARNING: We are about to convert your table storage format to UTF-8. This
If you ever used a version of Bugzilla before 2.22, we STRONGLY
recommend that you stop checksetup.pl NOW and run contrib/recode.pl.
END
no_checksetup_from_cgi => <<END,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>checksetup.pl cannot run from a web browser</title>
</head>
<body>
<h1>checksetup.pl cannot run from a web browser</h1>
<p>
You <b>must not</b> execute this script from your web browser.
To install or upgrade Bugzilla, run this script from
the command-line (e.g. <tt>bash</tt> or <tt>ssh</tt> on Linux
or <tt>cmd.exe</tt> on Windows), and follow instructions given there.
</p>
<p>
For more information on how to install Bugzilla, please
<a href="http://www.bugzilla.org/docs/">read the documentation</a>
available on the official Bugzilla website.
</p>
</body>
</html>
END
patchutils_missing => <<'
END
',
OPTIONAL NOTE: If you want to be able to use the '
difference
between
two
patches
' feature of Bugzilla (which requires the PatchReader Perl module
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment