summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2005-01-17 05:43:21 +0100
committerjocuri%softhome.net <>2005-01-17 05:43:21 +0100
commit0ffaf78a472cfd6dd5a4b1da80b5dd50f2611647 (patch)
tree7a7200a2f92cd1a8d05af66424b7116797ccb8e4
parent1ce889ad699125ad4cab16404b40f0df8fd3bf5b (diff)
downloadbugzilla-0ffaf78a472cfd6dd5a4b1da80b5dd50f2611647.tar.gz
bugzilla-0ffaf78a472cfd6dd5a4b1da80b5dd50f2611647.tar.xz
Patch for bug 254351: Patch to add a cookiedomain parameter; patch by Eric Haszlakiewicz <erh+mozilla@nimenees.com>, r=kiko, a=myk.
-rw-r--r--Bugzilla/CGI.pm4
-rwxr-xr-xbuglist.cgi2
-rw-r--r--defparams.pl11
-rwxr-xr-xpost_bug.cgi1
4 files changed, 15 insertions, 3 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index ce0a8ab6c..c4433cc62 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -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
diff --git a/buglist.cgi b/buglist.cgi
index 2c194d5a6..6df402781 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -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,
diff --git a/defparams.pl b/defparams.pl
index d97a09085..206e89e59 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -358,6 +358,17 @@ sub find_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 ' .
'Bugzilla cookies. Normally this is the URI portion of your URL ' .
diff --git a/post_bug.cgi b/post_bug.cgi
index b51e24db5..3f2d32062 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -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",