Commit db57bbc4 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Docs for bug 245877: use testagent.cgi and testserver.pl to test your…

Docs for bug 245877: use testagent.cgi and testserver.pl to test your installation - Patch by me, r=justdave
parent 79584710
<!-- <!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.132 2008/04/04 06:48:02 lpsolit%gmail.com Exp $ --> <!-- $Id: installation.xml,v 1.133 2008/04/04 06:48:03 lpsolit%gmail.com Exp $ -->
<chapter id="installing-bugzilla"> <chapter id="installing-bugzilla">
<title>Installing Bugzilla</title> <title>Installing Bugzilla</title>
...@@ -957,7 +957,10 @@ ...@@ -957,7 +957,10 @@
<para> <para>
Configure your web server according to the instructions in the Configure your web server according to the instructions in the
appropriate section. (If it makes a difference in your choice, appropriate section. (If it makes a difference in your choice,
the Bugzilla Team recommends Apache.) Regardless of which webserver the Bugzilla Team recommends Apache.) To check whether your web server
is correctly configured, try to access <filename>testagent.cgi</filename>
from your web server. If "OK" is displayed, then your configuration
is successful. Regardless of which web server
you are using, however, ensure that sensitive information is you are using, however, ensure that sensitive information is
not remotely available by properly applying the access controls in not remotely available by properly applying the access controls in
<xref linkend="security-webserver-access"/>. You can run <xref linkend="security-webserver-access"/>. You can run
......
<!-- <!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.7 2008/04/04 06:48:14 lpsolit%gmail.com Exp $ --> <!-- $Id: security.xml,v 1.16 2008/04/04 06:48:23 lpsolit%gmail.com Exp $ -->
<chapter id="security"> <chapter id="security">
<title>Bugzilla Security</title> <title>Bugzilla Security</title>
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
<quote>SYSTEM</quote> introduces obvious security concerns, the <quote>SYSTEM</quote> introduces obvious security concerns, the
problems introduced by running everything as <quote>nobody</quote> may problems introduced by running everything as <quote>nobody</quote> may
not be so obvious. Basically, if you run every daemon as not be so obvious. Basically, if you run every daemon as
<quote>nobody</quote> and one of them gets comprimised it can <quote>nobody</quote> and one of them gets compromised it can
comprimise every other daemon running as <quote>nobody</quote> on your compromise every other daemon running as <quote>nobody</quote> on your
machine. For this reason, it is recommended that you create a user machine. For this reason, it is recommended that you create a user
account for each daemon. account for each daemon.
</para> </para>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<title>The MySQL System Account</title> <title>The MySQL System Account</title>
<para>As mentioned in <xref linkend="security-os-accounts"/>, the MySQL <para>As mentioned in <xref linkend="security-os-accounts"/>, the MySQL
daemon should run as a non-privleged, unique user. Be sure to consult daemon should run as a non-privileged, unique user. Be sure to consult
the MySQL documentation or the documentation that came with your system the MySQL documentation or the documentation that came with your system
for instructions. for instructions.
</para> </para>
...@@ -141,15 +141,15 @@ ...@@ -141,15 +141,15 @@
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
any remote vulnerabilites in MySQL. any remote vulnerabilities in MySQL.
</para> </para>
<example id="security-mysql-network-ex"> <example id="security-mysql-network-ex">
<title>Disabling Networking in MySQL</title> <title>Disabling Networking in MySQL</title>
<para>Simply enter the following in <filename>/etc/my.conf</filename>: <para>Simply enter the following in <filename>/etc/my.cnf</filename>:
<screen> <screen>
[myslqd] [mysqld]
# Prevent network access to MySQL. # Prevent network access to MySQL.
skip-networking skip-networking
</screen> </screen>
...@@ -171,20 +171,19 @@ skip-networking ...@@ -171,20 +171,19 @@ skip-networking
<section id="security-webserver"> <section id="security-webserver">
<title>Webserver</title> <title>Web server</title>
<section id="security-webserver-access"> <section id="security-webserver-access">
<title>Disabling Remote Access to Bugzilla Configuration Files</title> <title>Disabling Remote Access to Bugzilla Configuration Files</title>
<para>There are many files that are placed in the Bugzilla directory <para>
area that should not be accessable from the web. Because of the way There are many files that are placed in the Bugzilla directory
Bugzilla is currently layed out, the list of what should and should not area that should not be accessible from the web. Because of the way
be accessible is rather complicated. A new installation method is Bugzilla is currently layed out, the list of what should and should not
currently in the works which should solve this by allowing files that be accessible is rather complicated. A quick way is to run
shouldn't be accessible from the web to be placed in a directory outside <filename>testserver.pl</filename> to check if your web server serves
the webroot. See Bugzilla files as expected. If not, you may want to follow the few
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=44659">bug 44659</ulink> steps below.
for more information.
</para> </para>
<tip> <tip>
...@@ -293,23 +292,19 @@ skip-networking ...@@ -293,23 +292,19 @@ skip-networking
</itemizedlist> </itemizedlist>
<para>Be sure to test that data that should not be accessed remotely is <para>Be sure to test that data that should not be accessed remotely is
properly blocked. Of particular intrest is the localconfig file which properly blocked. Of particular interest is the localconfig file which
contains your database password. Also, be aware that many editors contains your database password. Also, be aware that many editors
create temporary and backup files in the working directory and that create temporary and backup files in the working directory and that
those should also not be accessable. For more information, see those should also not be accessible. For more information, see
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=186383">bug 186383</ulink> <ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=186383">bug 186383</ulink>
or or
<ulink url="http://online.securityfocus.com/bid/6501">Bugtraq ID 6501</ulink>. <ulink url="http://online.securityfocus.com/bid/6501">Bugtraq ID 6501</ulink>.
To test, simply point your web browser at the file; for example, to To test, simply run <filename>testserver.pl</filename>, as said above.
test mozilla.org's installation, we'd try to access
<ulink url="http://bugzilla.mozilla.org/localconfig"/>. You should get
a <quote><errorcode>403</errorcode> <errorname>Forbidden</errorname></quote>
error.
</para> </para>
<tip> <tip>
<para>Be sure to check <xref linkend="http"/> for instructions <para>Be sure to check <xref linkend="http"/> for instructions
specific to the webserver you use. specific to the web server you use.
</para> </para>
</tip> </tip>
...@@ -352,28 +347,25 @@ skip-networking ...@@ -352,28 +347,25 @@ skip-networking
<section id="security-bugzilla-charset"> <section id="security-bugzilla-charset">
<title>Prevent users injecting malicious Javascript</title> <title>Prevent users injecting malicious Javascript</title>
<para>It is possible for a Bugzilla user to take advantage of character <para>If you installed Bugzilla version 2.22 or later from scratch,
set encoding ambiguities to inject HTML into Bugzilla comments. This then the <emphasis>utf8</emphasis> parameter is switched on by default.
could include malicious scripts. This makes Bugzilla explicitly set the character encoding, following
Due to internationalization concerns, we are unable to
incorporate by default the code changes suggested by
<ulink <ulink
url="http://www.cert.org/tech_tips/malicious_code_mitigation.html#3">the url="http://www.cert.org/tech_tips/malicious_code_mitigation.html#3">a
CERT advisory</ulink> on this issue. CERT advisory</ulink> recommending exactly this.
Making the change in <xref linkend="security-bugzilla-charset-ex"/> will The following therefore does not apply to you; just keep
prevent this problem. <emphasis>utf8</emphasis> turned on.
</para> </para>
<example id="security-bugzilla-charset-ex"> <para>If you've upgraded from an older version, then it may be possible
<title>Forcing Bugzilla to output a charset</title> for a Bugzilla user to take advantage of character set encoding
ambiguities to inject HTML into Bugzilla comments.
<para>Locate the following line in This could include malicious scripts.
<filename>Bugzilla/CGI.pm</filename>: This is because due to internationalization concerns, we are unable to
<programlisting>$self->charset('');</programlisting> turn the <emphasis>utf8</emphasis> parameter on by default for upgraded
and change it to: installations.
<programlisting>$self->charset('UTF-8');</programlisting> Turning it on manually will prevent this problem.
</para> </para>
</example>
</section> </section>
</section> </section>
......
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