Commit e6acfe2d authored by timeless%mozdev.org's avatar timeless%mozdev.org

Bug 345970 Avoid using the string 'the web'

patch by jhulten@tragicallyleet.com r=timeless I've updated it to trunk r=lpsolit a=lpsolit
parent 000f365f
...@@ -815,7 +815,7 @@ sub insert_attachment_for_bug { ...@@ -815,7 +815,7 @@ sub insert_attachment_for_bug {
$sth->bind_param(1, $data, $dbh->BLOB_TYPE); $sth->bind_param(1, $data, $dbh->BLOB_TYPE);
$sth->execute(); $sth->execute();
# If the file is to be stored locally, stream the file from the webserver # If the file is to be stored locally, stream the file from the web server
# to the local file without reading it into a local variable. # to the local file without reading it into a local variable.
if ($cgi->param('bigfile')) { if ($cgi->param('bigfile')) {
my $attachdir = bz_locations()->{'attachdir'}; my $attachdir = bz_locations()->{'attachdir'};
......
...@@ -45,7 +45,7 @@ use Bugzilla::Util; ...@@ -45,7 +45,7 @@ use Bugzilla::Util;
$| = 1; $| = 1;
# Ignore SIGTERM and SIGPIPE - this prevents DB corruption. If the user closes # Ignore SIGTERM and SIGPIPE - this prevents DB corruption. If the user closes
# their browser window while a script is running, the webserver sends these # their browser window while a script is running, the web server sends these
# signals, and we don't want to die half way through a write. # signals, and we don't want to die half way through a write.
$::SIG{TERM} = 'IGNORE'; $::SIG{TERM} = 'IGNORE';
$::SIG{PIPE} = 'IGNORE'; $::SIG{PIPE} = 'IGNORE';
......
...@@ -436,7 +436,7 @@ sub bz_locations { ...@@ -436,7 +436,7 @@ sub bz_locations {
'datadir' => "$libpath/$datadir", 'datadir' => "$libpath/$datadir",
'attachdir' => "$libpath/$datadir/attachments", 'attachdir' => "$libpath/$datadir/attachments",
'skinsdir' => "$libpath/skins", 'skinsdir' => "$libpath/skins",
# $webdotdir must be in the webtree somewhere. Even if you use a # $webdotdir must be in the web server's tree somewhere. Even if you use a
# local dot, we output images to there. Also, if $webdotdir is # local dot, we output images to there. Also, if $webdotdir is
# not relative to the bugzilla root directory, you'll need to # not relative to the bugzilla root directory, you'll need to
# change showdependencygraph.cgi to set image_url to the correct # change showdependencygraph.cgi to set image_url to the correct
......
...@@ -86,7 +86,7 @@ sub FILESYSTEM { ...@@ -86,7 +86,7 @@ sub FILESYSTEM {
my $owner_dir_readable = 0700; my $owner_dir_readable = 0700;
# Writeable by the web server. # Writeable by the web server.
my $ws_dir_writeable = $ws_group ? 0770 : 01777; my $ws_dir_writeable = $ws_group ? 0770 : 01777;
# The webserver can overwrite files owned by other users, # The web server can overwrite files owned by other users,
# in this directory. # in this directory.
my $ws_dir_full_control = $ws_group ? 0770 : 0777; my $ws_dir_full_control = $ws_group ? 0770 : 0777;
...@@ -275,13 +275,13 @@ Deny from all ...@@ -275,13 +275,13 @@ Deny from all
EOT EOT
}, },
# Even though $datadir may not (and should not) be in the webtree, # Even though $datadir may not (and should not) be accessible from the
# we can't know for sure, so create the .htaccess anyway. It's harmless # web server, we can't know for sure, so create the .htaccess anyway.
# if it's not accessible... # It's harmless if it isn't accessible...
"$datadir/.htaccess" => { perms => $ws_readable, contents => <<EOT "$datadir/.htaccess" => { perms => $ws_readable, contents => <<EOT
# Nothing in this directory is retrievable unless overridden by an .htaccess # Nothing in this directory is retrievable unless overridden by an .htaccess
# in a subdirectory; the only exception is duplicates.rdf, which is used by # in a subdirectory; the only exception is duplicates.rdf, which is used by
# duplicates.xul and must be loadable over the web # duplicates.xul and must be accessible from the web server
deny from all deny from all
<Files duplicates.rdf> <Files duplicates.rdf>
allow from all allow from all
......
...@@ -50,7 +50,7 @@ use constant LOCALCONFIG_VARS => ( ...@@ -50,7 +50,7 @@ use constant LOCALCONFIG_VARS => (
desc => <<EOT desc => <<EOT
# If you are using Apache as your web server, Bugzilla can create .htaccess # If you are using Apache as your web server, Bugzilla can create .htaccess
# files for you that will instruct Apache not to serve files that shouldn't # files for you that will instruct Apache not to serve files that shouldn't
# be accessed from the web (like your local configuration data and non-cgi # be accessed from the web browser (like your local configuration data and non-cgi
# executable files). For this to work, the directory your Bugzilla # executable files). For this to work, the directory your Bugzilla
# installation is in must be within the jurisdiction of a <Directory> block # installation is in must be within the jurisdiction of a <Directory> block
# in the httpd.conf file that has 'AllowOverride Limit' in it. If it has # in the httpd.conf file that has 'AllowOverride Limit' in it. If it has
......
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> --> <!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
<!-- $Id: installation.xml,v 1.138 2007/03/10 01:20:23 vladd%bugzilla.org Exp $ --> <!-- $Id: installation.xml,v 1.139 2007/07/24 18:22:02 timeless%mozdev.org Exp $ -->
<chapter id="installing-bugzilla"> <chapter id="installing-bugzilla">
<title>Installing Bugzilla</title> <title>Installing Bugzilla</title>
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<note> <note>
<para>If you just want to <emphasis>use</emphasis> Bugzilla, <para>If you just want to <emphasis>use</emphasis> Bugzilla,
you do not need to install it. None of this chapter is relevant to you do not need to install it. None of this chapter is relevant to
you. Ask your Bugzilla administrator you. Ask your Bugzilla administrator for the URL to access it from
for the URL to access it over the web. your web browser.
</para> </para>
</note> </note>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
However, we strongly recommend using the Apache web server However, we strongly recommend using the Apache web server
(either 1.3.x or 2.x), and (either 1.3.x or 2.x), and
the installation instructions usually assume you are the installation instructions usually assume you are
using it. If you have got Bugzilla working using another webserver, using it. If you have got Bugzilla working using another web server,
please share your experiences with us by filing a bug in &bzg-bugs;. please share your experiences with us by filing a bug in &bzg-bugs;.
</para> </para>
...@@ -182,10 +182,9 @@ ...@@ -182,10 +182,9 @@
Download a Bugzilla tarball (or check it out from CVS) and place Download a Bugzilla tarball (or check it out from CVS) and place
it in a suitable directory, accessible by the default web server user it in a suitable directory, accessible by the default web server user
(probably <quote>apache</quote> or <quote>www</quote>). (probably <quote>apache</quote> or <quote>www</quote>).
Good locations are either directly in the main web space for your Good locations are either directly in the web server's document directories or
web server or perhaps in in <filename>/usr/local</filename> with a symbolic link to the web server's
<filename>/usr/local</filename> document directories or an alias in the web server's configuration.
with a symbolic link from the web space.
</para> </para>
<caution> <caution>
...@@ -197,7 +196,7 @@ ...@@ -197,7 +196,7 @@
</caution> </caution>
<para>Once all the files are in a web accessible directory, make that <para>Once all the files are in a web accessible directory, make that
directory writable by your webserver's user. This is a temporary step directory writable by your web server's user. This is a temporary step
until you run the until you run the
<filename>checksetup.pl</filename> <filename>checksetup.pl</filename>
script, which locks down your installation.</para> script, which locks down your installation.</para>
...@@ -1048,14 +1047,14 @@ ...@@ -1048,14 +1047,14 @@
<para> <para>
<filename>checksetup.pl</filename> can set tighter permissions <filename>checksetup.pl</filename> can set tighter permissions
on Bugzilla's files and directories if it knows what group the on Bugzilla's files and directories if it knows what group the
webserver runs as. Find the <computeroutput>Group</computeroutput> web server runs as. Find the <computeroutput>Group</computeroutput>
line in <filename>httpd.conf</filename>, place the value found line in <filename>httpd.conf</filename>, place the value found
there in the <replaceable>$webservergroup</replaceable> variable there in the <replaceable>$webservergroup</replaceable> variable
in <filename>localconfig</filename>, then rerun in <filename>localconfig</filename>, then rerun
<filename>checksetup.pl</filename>. <filename>checksetup.pl</filename>.
</para> </para>
</step> </step>
<step> <step>
<para> <para>
Optional: If Bugzilla does not actually reside in the webspace Optional: If Bugzilla does not actually reside in the webspace
...@@ -1118,7 +1117,7 @@ ...@@ -1118,7 +1117,7 @@
<para> <para>
<filename>checksetup.pl</filename> can set tighter permissions <filename>checksetup.pl</filename> can set tighter permissions
on Bugzilla's files and directories if it knows what group the on Bugzilla's files and directories if it knows what group the
webserver runs as. Find the <computeroutput>Group</computeroutput> web server runs as. Find the <computeroutput>Group</computeroutput>
line in <filename>httpd.conf</filename>, place the value found line in <filename>httpd.conf</filename>, place the value found
there in the <replaceable>$webservergroup</replaceable> variable there in the <replaceable>$webservergroup</replaceable> variable
in <filename>localconfig</filename>, then rerun in <filename>localconfig</filename>, then rerun
...@@ -1241,7 +1240,7 @@ c:\perl\bin\perl.exe -xc:\bugzilla -wT "%s" %s ...@@ -1241,7 +1240,7 @@ c:\perl\bin\perl.exe -xc:\bugzilla -wT "%s" %s
The ActiveState install may have already created an entry for The ActiveState install may have already created an entry for
.pl files that is limited to <quote>GET,HEAD,POST</quote>. If .pl files that is limited to <quote>GET,HEAD,POST</quote>. If
so, this mapping should be <emphasis>removed</emphasis> as so, this mapping should be <emphasis>removed</emphasis> as
Bugzilla's .pl files are not designed to be run via a webserver. Bugzilla's .pl files are not designed to be run via a web server.
</para> </para>
</note> </note>
...@@ -2223,7 +2222,7 @@ pid-file=/home/foo/mymysql/the.pid ...@@ -2223,7 +2222,7 @@ pid-file=/home/foo/mymysql/the.pid
<title>HTTP Server</title> <title>HTTP Server</title>
<para>Ideally, this also needs to be installed as root and <para>Ideally, this also needs to be installed as root and
run under a special webserver account. As long as run under a special web server account. As long as
the web server will allow the running of *.cgi files outside of a the web server will allow the running of *.cgi files outside of a
cgi-bin, and a way of denying web access to certain files (such as a cgi-bin, and a way of denying web access to certain files (such as a
.htaccess file), you should be good in this department.</para> .htaccess file), you should be good in this department.</para>
......
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> --> <!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
<!-- $Id: security.xml,v 1.16 2006/11/20 19:48:43 lpsolit%gmail.com Exp $ --> <!-- $Id: security.xml,v 1.17 2007/07/24 18:22:02 timeless%mozdev.org Exp $ -->
<chapter id="security"> <chapter id="security">
<title>Bugzilla Security</title> <title>Bugzilla Security</title>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<note> <note>
<para>You will need to set the <option>webservergroup</option> option <para>You will need to set the <option>webservergroup</option> option
in <filename>localconfig</filename> to the group your webserver runs in <filename>localconfig</filename> to the group your web server runs
as. This will allow <filename>./checksetup.pl</filename> to set file as. This will allow <filename>./checksetup.pl</filename> to set file
permissions on Unix systems so that nothing is world-writable. permissions on Unix systems so that nothing is world-writable.
</para> </para>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<section id="security-mysql-network"> <section id="security-mysql-network">
<title>Network Access</title> <title>Network Access</title>
<para>If MySQL and your webserver both run on the same machine and you <para>If MySQL and your web server both run on the same machine and you
have no other reason to access MySQL remotely, then you should disable have no other reason to access MySQL remotely, then you should disable
the network access. This, along with the suggestion in the network access. This, along with the suggestion in
<xref linkend="security-os-ports"/>, will help protect your system from <xref linkend="security-os-ports"/>, will help protect your system from
...@@ -178,12 +178,12 @@ skip-networking ...@@ -178,12 +178,12 @@ skip-networking
<para> <para>
There are many files that are placed in the Bugzilla directory There are many files that are placed in the Bugzilla directory
area that should not be accessible from the web. Because of the way area that should not be accessible from the web server. Because of the way
Bugzilla is currently layed out, the list of what should and should not Bugzilla is currently layed out, the list of what should and should not
be accessible is rather complicated. A quick way is to run be accessible is rather complicated. A quick way is to run
<filename>testserver.pl</filename> to check if your web server serves <filename>testserver.pl</filename> to check if your web server serves
Bugzilla files as expected. If not, you may want to follow the few Bugzilla files as expected. If not, you may want to follow the few
steps below. steps below.
</para> </para>
<tip> <tip>
......
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> --> <!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
<!-- $Id: troubleshooting.xml,v 1.12 2006/07/31 22:22:51 mkanat%bugzilla.org Exp $ --> <!-- $Id: troubleshooting.xml,v 1.13 2007/07/24 18:22:02 timeless%mozdev.org Exp $ -->
<appendix id="troubleshooting"> <appendix id="troubleshooting">
<title>Troubleshooting</title> <title>Troubleshooting</title>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<para>If you have made it all the way through <para>If you have made it all the way through
<xref linkend="installation"/> (Installation) and <xref linkend="installation"/> (Installation) and
<xref linkend="configuration"/> (Configuration) but accessing the Bugzilla <xref linkend="configuration"/> (Configuration) but accessing the Bugzilla
URL doesn't work, the first thing to do is to check your webserver error URL doesn't work, the first thing to do is to check your web server error
log. For Apache, this is often located at log. For Apache, this is often located at
<filename>/etc/logs/httpd/error_log</filename>. The error messages <filename>/etc/logs/httpd/error_log</filename>. The error messages
you see may be self-explanatory enough to enable you to diagnose and you see may be self-explanatory enough to enable you to diagnose and
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<para> <para>
Bugzilla can also log all user-based errors (and many code-based errors) Bugzilla can also log all user-based errors (and many code-based errors)
that occur, without polluting the web server error log. To enable that occur, without polluting the web server's error log. To enable
Bugzilla error logging, create a file that Bugzilla can write to, named Bugzilla error logging, create a file that Bugzilla can write to, named
<filename>errorlog</filename>, in the Bugzilla <filename>data</filename> <filename>errorlog</filename>, in the Bugzilla <filename>data</filename>
directory. Errors will be logged as they occur, and will include the type directory. Errors will be logged as they occur, and will include the type
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
</section> </section>
<section id="trbl-testserver"> <section id="trbl-testserver">
<title>The Apache webserver is not serving Bugzilla pages</title> <title>The Apache web server is not serving Bugzilla pages</title>
<para>After you have run <command>checksetup.pl</command> twice, <para>After you have run <command>checksetup.pl</command> twice,
run <command>testserver.pl http://yoursite.yourdomain/yoururl</command> run <command>testserver.pl http://yoursite.yourdomain/yoururl</command>
to confirm that your webserver is configured properly for to confirm that your web server is configured properly for
Bugzilla. Bugzilla.
</para> </para>
<programlisting> <programlisting>
...@@ -75,9 +75,9 @@ TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-t ...@@ -75,9 +75,9 @@ TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-t
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The permissions on your library directories are set incorrectly. <para>The permissions on your library directories are set incorrectly.
They must, at the very least, be readable by the webserver user or They must, at the very least, be readable by the web server user or
group. It is recommended that they be world readable. group. It is recommended that they be world readable.
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
...@@ -144,7 +144,7 @@ TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-t ...@@ -144,7 +144,7 @@ TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-t
<para>The most-likely cause is that the <quote>cookiepath</quote> parameter <para>The most-likely cause is that the <quote>cookiepath</quote> parameter
is not set correctly in the Bugzilla configuration. You can change this (if is not set correctly in the Bugzilla configuration. You can change this (if
you're a Bugzilla administrator) from the editparams.cgi page via the web. you're a Bugzilla administrator) from the editparams.cgi page via the web interface.
</para> </para>
<para>The value of the cookiepath parameter should be the actual directory <para>The value of the cookiepath parameter should be the actual directory
......
...@@ -401,12 +401,12 @@ ...@@ -401,12 +401,12 @@
**************************************************************************** ****************************************************************************
WARNING! You have not entered a value for the "webservergroup" parameter WARNING! You have not entered a value for the "webservergroup" parameter
in localconfig. This means that certain files and directories which need in localconfig. This means that certain files and directories which need
to be editable by both you and the webserver must be world writable, and to be editable by both you and the web server must be world writable, and
other files (including the localconfig file which stores your database other files (including the localconfig file which stores your database
password) must be world readable. This means that _anyone_ who can obtain password) must be world readable. This means that _anyone_ who can obtain
local access to this machine can do whatever they want to your local access to this machine can do whatever they want to your
[%+ terms.Bugzilla %] installation, and is probably also able to run [%+ terms.Bugzilla %] installation, and is probably also able to run
arbitrary Perl code as the user that the webserver runs as. arbitrary Perl code as the user that the web server runs as.
You really, really, really need to change this setting. You really, really, really need to change this setting.
**************************************************************************** ****************************************************************************
......
...@@ -495,7 +495,7 @@ ...@@ -495,7 +495,7 @@
The file you are trying to attach is [% filesize FILTER html %] The file you are trying to attach is [% filesize FILTER html %]
kilobytes (KB) in size. Non-patch attachments cannot be more than kilobytes (KB) in size. Non-patch attachments cannot be more than
[%+ Param('maxattachmentsize') %] KB. <br> [%+ Param('maxattachmentsize') %] KB. <br>
We recommend that you store your attachment elsewhere on the web, We recommend that you store your attachment elsewhere
[% IF Param("allow_attach_url") %] [% IF Param("allow_attach_url") %]
and then specify the URL to this file on the attachment and then specify the URL to this file on the attachment
creation page in the <b>AttachURL</b> field. creation page in the <b>AttachURL</b> field.
......
...@@ -45,7 +45,7 @@ if ((@ARGV != 1) || ($ARGV[0] !~ /^https?:/)) ...@@ -45,7 +45,7 @@ if ((@ARGV != 1) || ($ARGV[0] !~ /^https?:/))
} }
# Try to determine the GID used by the webserver. # Try to determine the GID used by the web server.
my @pscmds = ('ps -eo comm,gid', 'ps -acxo command,gid', 'ps -acxo command,rgid'); my @pscmds = ('ps -eo comm,gid', 'ps -acxo command,gid', 'ps -acxo command,rgid');
my $sgid = 0; my $sgid = 0;
if ($^O !~ /MSWin32/i) { if ($^O !~ /MSWin32/i) {
...@@ -82,7 +82,7 @@ Bugzilla documentation.\n"; ...@@ -82,7 +82,7 @@ Bugzilla documentation.\n";
print print
"TEST-WARNING Webserver is running under group id not matching \$webservergroup. "TEST-WARNING Webserver is running under group id not matching \$webservergroup.
This if the tests below fail, this is probably the problem. This if the tests below fail, this is probably the problem.
Please refer to the webserver configuration section of the Bugzilla guide. Please refer to the web server configuration section of the Bugzilla guide.
If you are using virtual hosts or suexec, this warning may not apply.\n"; If you are using virtual hosts or suexec, this warning may not apply.\n";
} }
} elsif ($^O !~ /MSWin32/i) { } elsif ($^O !~ /MSWin32/i) {
...@@ -100,8 +100,8 @@ if (fetch($url)) { ...@@ -100,8 +100,8 @@ if (fetch($url)) {
} else { } else {
print print
"TEST-FAILED Fetch of skins/standard/index/front.png failed "TEST-FAILED Fetch of skins/standard/index/front.png failed
Your webserver could not fetch $url. Your web server could not fetch $url.
Check your webserver configuration and try again.\n"; Check your web server configuration and try again.\n";
exit(1); exit(1);
} }
...@@ -118,7 +118,7 @@ Check the AddHandler statement in your httpd.conf file.\n"; ...@@ -118,7 +118,7 @@ Check the AddHandler statement in your httpd.conf file.\n";
print "TEST-FAILED Webserver is not executing CGI files.\n"; print "TEST-FAILED Webserver is not executing CGI files.\n";
} }
# Make sure that webserver is honoring .htaccess files # Make sure that the web server is honoring .htaccess files
my $localconfig = bz_locations()->{'localconfig'}; my $localconfig = bz_locations()->{'localconfig'};
$localconfig =~ s~^\./~~; $localconfig =~ s~^\./~~;
$url = $ARGV[0] . "/$localconfig"; $url = $ARGV[0] . "/$localconfig";
...@@ -127,7 +127,7 @@ if ($response) { ...@@ -127,7 +127,7 @@ if ($response) {
print print
"TEST-FAILED Webserver is permitting fetch of $url. "TEST-FAILED Webserver is permitting fetch of $url.
This is a serious security problem. This is a serious security problem.
Check your webserver configuration.\n"; Check your web server configuration.\n";
exit(1); exit(1);
} else { } else {
print "TEST-OK Webserver is preventing fetch of $url.\n"; print "TEST-OK Webserver is preventing fetch of $url.\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment