From c41394dc564b3560a4bab40cb759997895e222d3 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Tue, 24 Jul 2007 18:22:02 +0000 Subject: [PATCH] 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 --- webtools/bugzilla/Bugzilla/Attachment.pm | 2 +- webtools/bugzilla/Bugzilla/CGI.pm | 2 +- webtools/bugzilla/Bugzilla/Constants.pm | 2 +- .../bugzilla/Bugzilla/Install/Filesystem.pm | 10 +++---- .../bugzilla/Bugzilla/Install/Localconfig.pm | 2 +- webtools/bugzilla/docs/xml/installation.xml | 27 +++++++++---------- webtools/bugzilla/docs/xml/security.xml | 12 ++++----- .../bugzilla/docs/xml/troubleshooting.xml | 18 ++++++------- .../en/default/global/messages.html.tmpl | 4 +-- .../en/default/global/user-error.html.tmpl | 2 +- webtools/bugzilla/testserver.pl | 12 ++++----- 11 files changed, 46 insertions(+), 47 deletions(-) diff --git a/webtools/bugzilla/Bugzilla/Attachment.pm b/webtools/bugzilla/Bugzilla/Attachment.pm index 5f669deb321..893c4668244 100644 --- a/webtools/bugzilla/Bugzilla/Attachment.pm +++ b/webtools/bugzilla/Bugzilla/Attachment.pm @@ -815,7 +815,7 @@ sub insert_attachment_for_bug { $sth->bind_param(1, $data, $dbh->BLOB_TYPE); $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. if ($cgi->param('bigfile')) { my $attachdir = bz_locations()->{'attachdir'}; diff --git a/webtools/bugzilla/Bugzilla/CGI.pm b/webtools/bugzilla/Bugzilla/CGI.pm index b4e2aca6ca6..ef2cb70f5e6 100644 --- a/webtools/bugzilla/Bugzilla/CGI.pm +++ b/webtools/bugzilla/Bugzilla/CGI.pm @@ -45,7 +45,7 @@ use Bugzilla::Util; $| = 1; # 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. $::SIG{TERM} = 'IGNORE'; $::SIG{PIPE} = 'IGNORE'; diff --git a/webtools/bugzilla/Bugzilla/Constants.pm b/webtools/bugzilla/Bugzilla/Constants.pm index d811796d03e..b7d0908ec8b 100644 --- a/webtools/bugzilla/Bugzilla/Constants.pm +++ b/webtools/bugzilla/Bugzilla/Constants.pm @@ -436,7 +436,7 @@ sub bz_locations { 'datadir' => "$libpath/$datadir", 'attachdir' => "$libpath/$datadir/attachments", '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 # not relative to the bugzilla root directory, you'll need to # change showdependencygraph.cgi to set image_url to the correct diff --git a/webtools/bugzilla/Bugzilla/Install/Filesystem.pm b/webtools/bugzilla/Bugzilla/Install/Filesystem.pm index 348f197b637..05da26336f0 100644 --- a/webtools/bugzilla/Bugzilla/Install/Filesystem.pm +++ b/webtools/bugzilla/Bugzilla/Install/Filesystem.pm @@ -86,7 +86,7 @@ sub FILESYSTEM { my $owner_dir_readable = 0700; # Writeable by the web server. 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. my $ws_dir_full_control = $ws_group ? 0770 : 0777; @@ -275,13 +275,13 @@ Deny from all EOT }, - # Even though $datadir may not (and should not) be in the webtree, - # we can't know for sure, so create the .htaccess anyway. It's harmless - # if it's not accessible... + # Even though $datadir may not (and should not) be accessible from the + # web server, we can't know for sure, so create the .htaccess anyway. + # It's harmless if it isn't accessible... "$datadir/.htaccess" => { perms => $ws_readable, contents => < allow from all diff --git a/webtools/bugzilla/Bugzilla/Install/Localconfig.pm b/webtools/bugzilla/Bugzilla/Install/Localconfig.pm index ed502d8a771..bfdb0ce946b 100644 --- a/webtools/bugzilla/Bugzilla/Install/Localconfig.pm +++ b/webtools/bugzilla/Bugzilla/Install/Localconfig.pm @@ -50,7 +50,7 @@ use constant LOCALCONFIG_VARS => ( desc => < block # in the httpd.conf file that has 'AllowOverride Limit' in it. If it has diff --git a/webtools/bugzilla/docs/xml/installation.xml b/webtools/bugzilla/docs/xml/installation.xml index 4b4b2853a7b..9f542dadf80 100644 --- a/webtools/bugzilla/docs/xml/installation.xml +++ b/webtools/bugzilla/docs/xml/installation.xml @@ -1,5 +1,5 @@ - + Installing Bugzilla @@ -9,8 +9,8 @@ If you just want to use Bugzilla, you do not need to install it. None of this chapter is relevant to - you. Ask your Bugzilla administrator - for the URL to access it over the web. + you. Ask your Bugzilla administrator for the URL to access it from + your web browser. @@ -164,7 +164,7 @@ However, we strongly recommend using the Apache web server (either 1.3.x or 2.x), and 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;. @@ -182,10 +182,9 @@ Download a Bugzilla tarball (or check it out from CVS) and place it in a suitable directory, accessible by the default web server user (probably apache or www). - Good locations are either directly in the main web space for your - web server or perhaps in - /usr/local - with a symbolic link from the web space. + Good locations are either directly in the web server's document directories or + in /usr/local with a symbolic link to the web server's + document directories or an alias in the web server's configuration. @@ -197,7 +196,7 @@ 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 checksetup.pl script, which locks down your installation. @@ -1048,14 +1047,14 @@ checksetup.pl can set tighter permissions on Bugzilla's files and directories if it knows what group the - webserver runs as. Find the Group + web server runs as. Find the Group line in httpd.conf, place the value found there in the $webservergroup variable in localconfig, then rerun checksetup.pl. - + Optional: If Bugzilla does not actually reside in the webspace @@ -1118,7 +1117,7 @@ checksetup.pl can set tighter permissions on Bugzilla's files and directories if it knows what group the - webserver runs as. Find the Group + web server runs as. Find the Group line in httpd.conf, place the value found there in the $webservergroup variable in localconfig, then rerun @@ -1241,7 +1240,7 @@ c:\perl\bin\perl.exe -xc:\bugzilla -wT "%s" %s The ActiveState install may have already created an entry for .pl files that is limited to GET,HEAD,POST. If so, this mapping should be removed 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. @@ -2223,7 +2222,7 @@ pid-file=/home/foo/mymysql/the.pid HTTP Server 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 cgi-bin, and a way of denying web access to certain files (such as a .htaccess file), you should be good in this department. diff --git a/webtools/bugzilla/docs/xml/security.xml b/webtools/bugzilla/docs/xml/security.xml index c5b21e22998..1ef9aa7dd84 100644 --- a/webtools/bugzilla/docs/xml/security.xml +++ b/webtools/bugzilla/docs/xml/security.xml @@ -1,5 +1,5 @@ - + Bugzilla Security @@ -57,7 +57,7 @@ You will need to set the option - in localconfig to the group your webserver runs + in localconfig to the group your web server runs as. This will allow ./checksetup.pl to set file permissions on Unix systems so that nothing is world-writable. @@ -137,7 +137,7 @@
Network Access - If MySQL and your webserver both run on the same machine and you + 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 the network access. This, along with the suggestion in , will help protect your system from @@ -178,12 +178,12 @@ skip-networking 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 be accessible is rather complicated. A quick way is to run - testserver.pl to check if your web server serves + testserver.pl to check if your web server serves Bugzilla files as expected. If not, you may want to follow the few - steps below. + steps below. diff --git a/webtools/bugzilla/docs/xml/troubleshooting.xml b/webtools/bugzilla/docs/xml/troubleshooting.xml index 30692fdc723..229b114cf25 100644 --- a/webtools/bugzilla/docs/xml/troubleshooting.xml +++ b/webtools/bugzilla/docs/xml/troubleshooting.xml @@ -1,5 +1,5 @@ - + Troubleshooting @@ -22,7 +22,7 @@ If you have made it all the way through (Installation) and (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 /etc/logs/httpd/error_log. The error messages you see may be self-explanatory enough to enable you to diagnose and @@ -32,7 +32,7 @@ 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 errorlog, in the Bugzilla data directory. Errors will be logged as they occur, and will include the type @@ -45,10 +45,10 @@
- The Apache webserver is not serving Bugzilla pages + The Apache web server is not serving Bugzilla pages After you have run checksetup.pl twice, run testserver.pl http://yoursite.yourdomain/yoururl - to confirm that your webserver is configured properly for + to confirm that your web server is configured properly for Bugzilla. @@ -75,9 +75,9 @@ TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-t - The permissions on your library directories are set incorrectly. - They must, at the very least, be readable by the webserver user or - group. It is recommended that they be world readable. + The permissions on your library directories are set incorrectly. + They must, at the very least, be readable by the web server user or + group. It is recommended that they be world readable. @@ -144,7 +144,7 @@ TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-t The most-likely cause is that the cookiepath parameter 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. The value of the cookiepath parameter should be the actual directory diff --git a/webtools/bugzilla/template/en/default/global/messages.html.tmpl b/webtools/bugzilla/template/en/default/global/messages.html.tmpl index 205d296a441..2b6621069ec 100644 --- a/webtools/bugzilla/template/en/default/global/messages.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/messages.html.tmpl @@ -401,12 +401,12 @@ **************************************************************************** WARNING! You have not entered a value for the "webservergroup" parameter 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 password) must be world readable. This means that _anyone_ who can obtain local access to this machine can do whatever they want to your [%+ 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. **************************************************************************** diff --git a/webtools/bugzilla/template/en/default/global/user-error.html.tmpl b/webtools/bugzilla/template/en/default/global/user-error.html.tmpl index 79817e881d4..f7fe1d652c8 100644 --- a/webtools/bugzilla/template/en/default/global/user-error.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/user-error.html.tmpl @@ -495,7 +495,7 @@ The file you are trying to attach is [% filesize FILTER html %] kilobytes (KB) in size. Non-patch attachments cannot be more than [%+ Param('maxattachmentsize') %] KB.
- We recommend that you store your attachment elsewhere on the web, + We recommend that you store your attachment elsewhere [% IF Param("allow_attach_url") %] and then specify the URL to this file on the attachment creation page in the AttachURL field. diff --git a/webtools/bugzilla/testserver.pl b/webtools/bugzilla/testserver.pl index 108a19ac28b..6169a77e0db 100755 --- a/webtools/bugzilla/testserver.pl +++ b/webtools/bugzilla/testserver.pl @@ -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 $sgid = 0; if ($^O !~ /MSWin32/i) { @@ -82,7 +82,7 @@ Bugzilla documentation.\n"; print "TEST-WARNING Webserver is running under group id not matching \$webservergroup. 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"; } } elsif ($^O !~ /MSWin32/i) { @@ -100,8 +100,8 @@ if (fetch($url)) { } else { print "TEST-FAILED Fetch of skins/standard/index/front.png failed -Your webserver could not fetch $url. -Check your webserver configuration and try again.\n"; +Your web server could not fetch $url. +Check your web server configuration and try again.\n"; exit(1); } @@ -118,7 +118,7 @@ Check the AddHandler statement in your httpd.conf file.\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'}; $localconfig =~ s~^\./~~; $url = $ARGV[0] . "/$localconfig"; @@ -127,7 +127,7 @@ if ($response) { print "TEST-FAILED Webserver is permitting fetch of $url. This is a serious security problem. -Check your webserver configuration.\n"; +Check your web server configuration.\n"; exit(1); } else { print "TEST-OK Webserver is preventing fetch of $url.\n";