From: justdave%syndicomm.com <>
Date: Sun, 18 Jan 2004 10:53:33 +0000 (+0000)
Subject: Bug 228706: Fixes invalid expiration dates on almost all of the cookies. Amazingly...
X-Git-Tag: bugzilla-2.16.5~11
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=053e98c8a19b9435aa49b3a464066f1226fa2cdb;p=thirdparty%2Fbugzilla.git
Bug 228706: Fixes invalid expiration dates on almost all of the cookies. Amazingly it mostly worked before. It'll work better now. :)
r= myk, a= justdave
---
diff --git a/CGI.pl b/CGI.pl
index 5b093d0413..dd48110426 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -755,8 +755,8 @@ sub confirm_login {
$::COOKIE{"Bugzilla_logincookie"} = $logincookie;
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";
+ print "Set-Cookie: Bugzilla_login=$enteredlogin ; path=$cookiepath; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
+ print "Set-Cookie: Bugzilla_logincookie=$logincookie ; path=$cookiepath; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
}
my $loginok = quietly_check_login();
@@ -764,8 +764,8 @@ sub confirm_login {
if ($loginok != 1) {
if ($::disabledreason) {
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
+ print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT
+Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT
Content-type: text/html
";
diff --git a/buglist.cgi b/buglist.cgi
index fac70e5c34..8cec40d703 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -1333,7 +1333,7 @@ if ($order) {
. "name $qfragment.";
if ($order_from_cookie) {
my $cookiepath = Param("cookiepath");
- print "Set-Cookie: LASTORDER= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT\n";
+ print "Set-Cookie: LASTORDER= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT\n";
$error =~ s/form submission/cookie/;
$error .= " The cookie has been cleared.";
}
@@ -1576,15 +1576,15 @@ if ($format->{'extension'} eq "html") {
if ($order) {
my $qorder = url_quote($order);
- print "Set-Cookie: LASTORDER=$qorder ; path=$cookiepath; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+ print "Set-Cookie: LASTORDER=$qorder ; path=$cookiepath; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
}
my $bugids = join(":", map( $_->{'id'}, @bugs));
# See also Bug 111999
if (length($bugids) < 4000) {
- print "Set-Cookie: BUGLIST=$bugids ; path=$cookiepath; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+ print "Set-Cookie: BUGLIST=$bugids ; path=$cookiepath; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
}
else {
- print "Set-Cookie: BUGLIST= ; path=$cookiepath; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+ print "Set-Cookie: BUGLIST= ; path=$cookiepath; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
$vars->{'toolong'} = 1;
}
}
diff --git a/colchange.cgi b/colchange.cgi
index 64dd9c4a5d..e5c15ba65e 100755
--- a/colchange.cgi
+++ b/colchange.cgi
@@ -84,8 +84,8 @@ if (defined $::FORM{'rememberedquery'}) {
my $list = join(" ", @collist);
my $urlbase = Param("urlbase");
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 "Set-Cookie: COLUMNLIST=$list ; path=$cookiepath ; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
+ print "Set-Cookie: SPLITHEADER=$::FORM{'splitheader'} ; path=$cookiepath ; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n";
print "\n";
print "\n";
diff --git a/createaccount.cgi b/createaccount.cgi
index e409f28b87..1c0448c20d 100755
--- a/createaccount.cgi
+++ b/createaccount.cgi
@@ -55,8 +55,8 @@ if(Param('useLDAP')) {
# Clear out the login cookies. Make people log in again if they create an
# account; otherwise, they'll probably get confused.
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\n";
+print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT
+Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT\n";
print "Content-Type: text/html\n\n";
diff --git a/post_bug.cgi b/post_bug.cgi
index 6f37b18bff..101d949b3a 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -76,7 +76,7 @@ my $cookiepath = Param("cookiepath");
if (exists $::FORM{'product'}) {
if (exists $::FORM{'version'}) {
print "Set-Cookie: VERSION-$product=$::FORM{'version'} ; " .
- "path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
+ "path=$cookiepath ; expires=Sat, 30-Jun-2029 00:00:00 GMT\n";
}
}
diff --git a/query.cgi b/query.cgi
index c75834c339..9c38831c36 100755
--- a/query.cgi
+++ b/query.cgi
@@ -89,7 +89,7 @@ if ($::userid) {
}
}
print "Set-Cookie: $cookiename= ; path=" . Param("cookiepath") .
- "; expires=Sun, 30-Jun-1980 00:00:00 GMT\n";
+ "; expires=Tue, 15-Sep-1998 21:49:00 GMT\n";
}
}
}
diff --git a/relogin.cgi b/relogin.cgi
index d3023c850b..326bf80298 100755
--- a/relogin.cgi
+++ b/relogin.cgi
@@ -51,8 +51,8 @@ if ($::userid) {
}
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
+print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT
+Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Tue, 15-Sep-1998 21:49:00 GMT
";
delete $::COOKIE{"Bugzilla_login"};