]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 19910: Bugzilla installs on the same server would interfere with each...
authorjustdave%syndicomm.com <>
Sat, 13 Oct 2001 07:40:39 +0000 (07:40 +0000)
committerjustdave%syndicomm.com <>
Sat, 13 Oct 2001 07:40:39 +0000 (07:40 +0000)
Patch by Dave Lawrence <dkl@redhat.com>
r= myk, justdave

CGI.pl
buglist.cgi
colchange.cgi
createaccount.cgi
defparams.pl
post_bug.cgi
query.cgi
relogin.cgi

diff --git a/CGI.pl b/CGI.pl
index f93c0601b508f9524b8c346c9be65edcc3f7f2d2..6f9461b8f875dc08f8e9c32e0869f366aa8afc36 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -985,23 +985,18 @@ sub confirm_login {
        my $logincookie = FetchOneColumn();
 
        $::COOKIE{"Bugzilla_logincookie"} = $logincookie;
-       print "Set-Cookie: Bugzilla_login=$enteredlogin ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
-       print "Set-Cookie: Bugzilla_logincookie=$logincookie ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
-
-       # This next one just cleans out any old bugzilla passwords that may
-       # be sitting around in the cookie files, from the bad old days when
-       # we actually stored the password there.
-       print "Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT\n";
+       my $cookiepath = Param("cookiepath");
+       print "Set-Cookie: Bugzilla_login=$enteredlogin ; path=$cookiepath; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+       print "Set-Cookie: Bugzilla_logincookie=$logincookie ; path=$cookiepath; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
     }
 
-
     my $loginok = quietly_check_login();
 
     if ($loginok != 1) {
         if ($::disabledreason) {
-            print "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
-Set-Cookie: Bugzilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
-Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
+            my $cookiepath = Param("cookiepath");
+            print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
+Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
 Content-type: text/html
 
 ";
index c2eff0055bbab8c0001093bbfd3ee68ca58c70c9..048d4582ab4bd0a4c25cc67282d4cd4b2e66b5e9 100755 (executable)
@@ -1329,7 +1329,8 @@ if ($serverpush) {
 my $toolong = 0;
 if ($::FORM{'order'}) {
     my $q = url_quote($::FORM{'order'});
-    print "Set-Cookie: LASTORDER=$q ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+    my $cookiepath = Param("cookiepath");
+    print "Set-Cookie: LASTORDER=$q ; path=$cookiepath; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
 }
 if (length($buglist) < 4000) {
     print "Set-Cookie: BUGLIST=$buglist\n\n";
index f3521b7ad3e905f25d33d5051d455bb6baaa7398..456aeb499cbd529d538d8143738b6c84fda3ec54 100755 (executable)
@@ -75,8 +75,9 @@ if (defined $::FORM{'rememberedquery'}) {
     }
     my $list = join(" ", @collist);
     my $urlbase = Param("urlbase");
-    print "Set-Cookie: COLUMNLIST=$list ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
-    print "Set-Cookie: SPLITHEADER=$::FORM{'splitheader'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+    my $cookiepath = Param("cookiepath");
+    print "Set-Cookie: COLUMNLIST=$list ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+    print "Set-Cookie: SPLITHEADER=$::FORM{'splitheader'} ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
     print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n";
     print "\n";
     print "<META HTTP-EQUIV=Refresh CONTENT=\"1; URL=$urlbase"."buglist.cgi?$::FORM{'rememberedquery'}\">\n";
index 88c18d0fd282ab6305d17d65bfdd091c8ca44382..4e5f6d49df82b1bfe7bb98a0e7b4e64c43f9b9ef 100755 (executable)
@@ -37,9 +37,9 @@ ConnectToDatabase();
 # Clear out the login cookies.  Make people log in again if they create an
 # account; otherwise, they'll probably get confused.
 
-print "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
-Set-Cookie: Bugzilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
-Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
+my $cookiepath = Param("cookiepath");
+print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
+Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
 Content-type: text/html
 
 ";
index 00f33277362c92d9a139b888a7d1701b9fe763de..51ea4550aac39d07448bb5f0fef80435fc715b48 100644 (file)
@@ -140,6 +140,11 @@ sub check_urlbase {
     return "";
 }
 
+DefParam("cookiepath", 
+  "Directory path under your document root that holds your Bugzilla installation. Make sure to begin with a /.",
+  "t",
+  "/");
+
 DefParam("preferlists",
        "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.",
        "b",
index f1a3e6443c150feef23f70410fb5386f39e42126..4fc7e9c9904e56fdb043e9e20ce810d82db01d09 100755 (executable)
@@ -48,8 +48,9 @@ sub sillyness {
 
 confirm_login();
 
-print "Set-Cookie: PLATFORM=$::FORM{'product'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n" if ( exists $::FORM{'product'} );
-print "Set-Cookie: VERSION-$::FORM{'product'}=$::FORM{'version'} ; path=/ ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n" if ( exists $::FORM{'product'} && exists $::FORM{'version'} );
+my $cookiepath = Param("cookiepath");
+print "Set-Cookie: PLATFORM=$::FORM{'product'} ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n" if ( exists $::FORM{'product'} );
+print "Set-Cookie: VERSION-$::FORM{'product'}=$::FORM{'version'} ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n" if ( exists $::FORM{'product'} && exists $::FORM{'version'} );
 
 print "Content-type: text/html\n\n";
 
index 8ecb17e442bf2b421adcd3f7594f9d8adc7fa8cf..64107a0f8763ab47f6992c50af3c936883b87daa 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -95,7 +95,7 @@ if ($userid) {
                             "($userid, $qname, " . SqlQuote($value) . ")");
                 }
             }
-            print "Set-Cookie: $cookiename= ; path=; expires=Sun, 30-Jun-1980 00:00:00 GMT\n";
+            print "Set-Cookie: $cookiename= ; path=" . Param("cookiepath"). "; expires=Sun, 30-Jun-1980 00:00:00 GMT\n";
         }
     }
 }
index a179bafb70dab64533c2e9960271d9165c01b7b0..cafb5b93a0c497ff2aaf9ac7da10e21751aa5fd6 100755 (executable)
@@ -27,10 +27,9 @@ use vars %::COOKIE;
 
 require "CGI.pl";
 
-
-print "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
-Set-Cookie: Bugzilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
-Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
+my $cookiepath = Param("cookiepath");
+print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
+Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
 Content-type: text/html
 
 ";