]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 254351: Patch to add a cookiedomain parameter; patch by Eric Haszlakiew...
authorjocuri%softhome.net <>
Mon, 17 Jan 2005 04:43:21 +0000 (04:43 +0000)
committerjocuri%softhome.net <>
Mon, 17 Jan 2005 04:43:21 +0000 (04:43 +0000)
Bugzilla/CGI.pm
buglist.cgi
defparams.pl
post_bug.cgi

index ce0a8ab6c941d7a2fb83fc7bd5b0bb8287dd4532..c4433cc62b77575883ea136e83fc2b64ecd4aedd 100644 (file)
@@ -179,6 +179,10 @@ sub send_cookie {
 
     # Add the default path in
     unshift(@_, '-path' => Param('cookiepath'));
+    if (Param('cookiedomain'))
+    {
+        unshift(@_, '-domain' => Param('cookiedomain'));
+    }
 
     # Use CGI::Cookie directly, because CGI.pm's |cookie| method gives the
     # current value if there isn't a -value attribute, which happens when
index 2c194d5a6204af4e4694c54f0f39c29e300a7843..6df402781e394ddaecfaab487fa54343affefe2e 100755 (executable)
@@ -961,8 +961,6 @@ my $contenttype;
 my $disp = "inline";
 
 if ($format->{'extension'} eq "html") {
-    my $cookiepath = Param("cookiepath");
-
     if ($order) {
         $cgi->send_cookie(-name => 'LASTORDER',
                           -value => $order,
index d97a0908559778f24747e60f4e4afe7849feb612..206e89e591aacfbed5fec48647f83431ea12faee 100644 (file)
@@ -357,6 +357,17 @@ sub find_languages {
    checker => \&check_languages
   },
 
+  {
+   name => 'cookiedomain',
+   desc => 'The domain for Bugzilla cookies.  Normally blank.  ' .
+           'If your website is at "www.foo.com", setting this to ' .
+           '".foo.com" will also allow bar.foo.com to access ' .
+           'Bugzilla cookies.  This is useful if you have more than ' .
+           'one hostname pointing at the same web server, and you ' .
+           'want them to share the Bugzilla cookie.',
+   type => 't',
+   default => ''
+  },
   {
    name => 'cookiepath',
    desc => 'Path, relative to your web document root, to which to restrict ' .
index b51e24db51d27010bdde85d956117e7e2c605546..3f2d32062f2d59f562066451b8c36e589d437687 100755 (executable)
@@ -84,7 +84,6 @@ if (!$product_id) {
 }
 
 # Set cookies
-my $cookiepath = Param("cookiepath");
 if (exists $::FORM{'product'}) {
     if (exists $::FORM{'version'}) {
         $cgi->send_cookie(-name => "VERSION-$product",