]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 380756: Remove duplicates.xul (and all the code related to it) - Patch by FrÃ...
authorlpsolit%gmail.com <>
Wed, 21 May 2008 05:00:57 +0000 (05:00 +0000)
committerlpsolit%gmail.com <>
Wed, 21 May 2008 05:00:57 +0000 (05:00 +0000)
Bugzilla/Install/Filesystem.pm
collectstats.pl
docs/en/xml/security.xml
duplicates.cgi
template/en/default/filterexceptions.pl

index c19cef4030b569b6b49fd04bade89fff8f38b1c3..8c6e7d52edccafb4c00809d0546302131e1f3aa0 100644 (file)
@@ -287,12 +287,8 @@ EOT
         # It's harmless if it isn't accessible...
         "$datadir/.htaccess" => { perms    => $ws_readable, contents => <<EOT
 # Nothing in this directory is retrievable unless overridden by an .htaccess
-# in a subdirectory; the only exception is duplicates.rdf, which is used by
-# duplicates.xul and must be accessible from the web server
+# in a subdirectory.
 deny from all
-<Files duplicates.rdf>
-  allow from all
-</Files>
 EOT
 
 
@@ -371,6 +367,11 @@ EOT
         unlink "$datadir/versioncache";
     }
 
+    if (-e "$datadir/duplicates.rdf") {
+        print "Removing duplicates.rdf...\n";
+        unlink "$datadir/duplicates.rdf";
+        unlink "$datadir/duplicates-old.rdf";
+    }
 }
 
 # A simple helper for creating "empty" CSS files.
index 4515b424c484785c052b4e2a668b0d841e72126f..4c66810a049c2f9c3a46960d17c9a78b3a7ec3d4 100755 (executable)
@@ -134,32 +134,6 @@ my $tend = time;
 
 CollectSeriesData();
 
-{
-    local $ENV{'GATEWAY_INTERFACE'} = 'cmdline';
-    local $ENV{'REQUEST_METHOD'} = 'GET';
-    local $ENV{'QUERY_STRING'} = 'ctype=rdf';
-
-    my $perl = $^X;
-    trick_taint($perl);
-
-    # Generate a static RDF file containing the default view of the duplicates data.
-    open(CGI, "$perl -T duplicates.cgi |")
-        || die "can't fork duplicates.cgi: $!";
-    open(RDF, ">$datadir/duplicates.tmp")
-        || die "can't write to $datadir/duplicates.tmp: $!";
-    my $headers_done = 0;
-    while (<CGI>) {
-        print RDF if $headers_done;
-        $headers_done = 1 if $_ eq "\r\n";
-    }
-    close CGI;
-    close RDF;
-}
-if (-s "$datadir/duplicates.tmp") {
-    rename("$datadir/duplicates.rdf", "$datadir/duplicates-old.rdf");
-    rename("$datadir/duplicates.tmp", "$datadir/duplicates.rdf");
-}
-
 sub check_data_dir {
     my $dir = shift;
 
index b6bd0bcc824e1cb93b18c1fb8623a32c71c3eb31..f1835a3336ed9031062e23787cea4725fed39104 100644 (file)
@@ -1,5 +1,5 @@
 <!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
-<!-- $Id: security.xml,v 1.15 2008/04/04 06:48:22 mozilla%colinogilvie.co.uk Exp $ -->
+<!-- $Id: security.xml,v 1.19 2008/05/21 00:01:04 lpsolit%gmail.com Exp $ -->
 
 <chapter id="security">
 <title>Bugzilla Security</title>
@@ -57,7 +57,7 @@
     
       <note>
         <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
         permissions on Unix systems so that nothing is world-writable.
         </para>
     <section id="security-mysql-network">
     <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
       the network access. This, along with the suggestion in
       <xref linkend="security-os-ports"/>, will help protect your system from
@@ -171,20 +171,19 @@ skip-networking
   
   
   <section id="security-webserver">
-  <title>Webserver</title>
+  <title>Web server</title>
 
     <section id="security-webserver-access">
     <title>Disabling Remote Access to Bugzilla Configuration Files</title>
     
-      <para>There are many files that are placed in the Bugzilla directory
-      area that should not be accessable from the web. Because of the way
-      Bugzilla is currently layed out, the list of what should and should not
-      be accessible is rather complicated. A new installation method is
-      currently in the works which should solve this by allowing files that
-      shouldn't be accessible from the web to be placed in a directory outside
-      the webroot. See 
-      <ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=44659">bug 44659</ulink>
-      for more information.
+      <para>
+        There are many files that are placed in the Bugzilla directory
+        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
+        <filename>testserver.pl</filename> to check if your web server serves
+        Bugzilla files as expected. If not, you may want to follow the few
+        steps below.
       </para>
       
       <tip>
@@ -216,13 +215,6 @@ skip-networking
             <listitem>
               <para>Block everything</para>
             </listitem>
-            <listitem>
-              <para>But allow:
-              <simplelist type="inline">
-                <member><filename>duplicates.rdf</filename></member>
-              </simplelist>
-              </para>
-            </listitem>
           </itemizedlist>
         </listitem>
 
@@ -296,52 +288,21 @@ skip-networking
       properly blocked. Of particular interest is the localconfig file which
       contains your database password. Also, be aware that many editors
       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>
       or
       <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
-      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.
+      To test, simply run <filename>testserver.pl</filename>, as said above.
       </para>
       
       <tip>
         <para>Be sure to check <xref linkend="http"/> for instructions
-        specific to the webserver you use.
+        specific to the web server you use.
         </para>
       </tip>
     
     </section>
 
-
-    <section id="security-webserver-mod-throttle">
-      <title>Using <filename>mod_throttle</filename> to Prevent a DOS</title>
-
-      <note>
-        <para>This section only applies to people who have chosen the Apache
-        webserver. It may be possible to do similar things with other
-        webservers. Consult the documentation that came with your webserver
-        to find out.
-        </para>
-      </note>
-
-      <para>It is possible for a user, by mistake or on purpose, to access
-      the database many times in a row which can result in very slow access
-      speeds for other users (effectively, a
-      <glossterm linkend="gloss-dos">DOS</glossterm> attack). If your
-      Bugzilla installation is experiencing this problem, you may install
-      the Apache module <filename>mod_throttle</filename> which can limit
-      connections by IP address. You may download this module at 
-      <ulink url="http://www.snert.com/Software/mod_throttle/"/>.
-      Follow the instructions to install into your Apache install. 
-      The command you need is 
-      <command>ThrottleClientIP</command>. See the 
-      <ulink url="http://www.snert.com/Software/mod_throttle/">documentation</ulink>
-      for more information.</para>
-    </section>
-
       
   </section>
   
index 32553a39d71be47c23b42621de0a0f7621872b2f..06334e22b9874fdcb7e63b5235932bc4845f10fe 100755 (executable)
@@ -37,19 +37,6 @@ use Bugzilla::Search;
 use Bugzilla::Product;
 
 my $cgi = Bugzilla->cgi;
-
-# Go directly to the XUL version of the duplicates report (duplicates.xul)
-# if the user specified ctype=xul.  Adds params if they exist, and directs
-# the user to a signed copy of the script in duplicates.jar if it exists.
-if (defined $cgi->param('ctype') && $cgi->param('ctype') eq "xul") {
-    my $params = CanonicaliseParams($cgi->query_string(), ["format", "ctype"]);
-    my $url = (-e "duplicates.jar" ? "duplicates.jar!/" : "") . 
-          "duplicates.xul" . ($params ? "?$params" : "") . "\n\n";
-
-    print $cgi->redirect($url);
-    exit;
-}
-
 my $template = Bugzilla->template;
 my $vars = {};
 
index c25e400c3f4763d290c6412a6af60692482f704c..3ff80568fd612a233929a390ac7b1691f51ace47 100644 (file)
   'cumulate',
 ],
 
-'reports/duplicates.rdf.tmpl' => [
-  'template_version', 
-  'bug.id', 
-  'bug.count', 
-  'bug.delta', 
-],
-
 'reports/chart.html.tmpl' => [
   'width', 
   'height',