You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/11/03 05:25:28 UTC

[PATCH] mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years (fwd)

+1

Dean

---------- Forwarded message ----------
Date: 31 Oct 1997 21:27:51 -0000
From: Paul Eggert <eg...@twinsun.com>
To: apbugs@hyperreal.org
Subject: mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years


>Number:         1342
>Category:       mod_usertrack
>Synopsis:       year-3000 bug in two-digit cookie expiration years
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Oct 31 13:30:01 PST 1997
>Last-Modified:
>Originator:     eggert@twinsun.com
>Organization:
apache
>Release:        1.2.4
>Environment:
SunOS shade.twinsun.com 5.6 Generic sun4u sparc SUNW,Ultra-1
>Description:
There's a year-3000 bug in the two-digit years in cookie expiration dates.
In 3000, tm_year is 200, so subtracting 100 stops working.

I know, I know, I'm being picky, but you'll thank me on Jan 1, 3000,
when you're running Apache on your 64-bit time_t host!
>How-To-Repeat:

>Fix:
--- mod_usertrack.c	1997/03/07 14:15:45	1.2.4.0
+++ mod_usertrack.c	1997/10/31 21:19:05	1.2.4.1
@@ -176,5 +176,5 @@ void make_cookie(request_rec *r)
 	      COOKIE_NAME, cookiebuf, days[tms->tm_wday],
 	      tms->tm_mday, month_snames[tms->tm_mon],
-	      (tms->tm_year >= 100) ? tms->tm_year - 100 : tms->tm_year,
+	      tms->tm_year % 100,
 	      tms->tm_hour, tms->tm_min, tms->tm_sec);
     }
%0
>Audit-Trail:
>Unformatted:



Re: [PATCH] mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years (fwd)

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Mon, Nov 03, 1997 at 02:13:20AM -0800, Dean Gaudet wrote:
> So I guess that's a +1 then eh? 

Grshhh [grinding teeth] yep.
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: [PATCH] mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.
The netscape cookie standard, the original one, dictated two digit years
by way of an example.  It did not specify the format that should be used
explicitly.  I'm sure the current state proposal fixes this ... and I'd
guess that you could use other date formats with the various browsers out
there anyhow, but maybe not. 

So I guess that's a +1 then eh? 

Dean

On Mon, 3 Nov 1997, Martin Kraemer wrote:

> > > There's a year-3000 bug in the two-digit years in cookie expiration dates.
> > > In 3000, tm_year is 200, so subtracting 100 stops working.
> 
> Guess he means 2100. Is the cookie-"standard" really so f@#$%^& stupid
> that it doesn't accept "real" dates? No way to use them with 4 digit years?
> 
> If that's indeed so, then +1. Otherwise: -1.
> 
>     Martin
> -- 
> | S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
> | ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
> | N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
> ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request
> 


Re: [PATCH] mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years (fwd)

Posted by Martin Kraemer <Ma...@mch.sni.de>.
> > There's a year-3000 bug in the two-digit years in cookie expiration dates.
> > In 3000, tm_year is 200, so subtracting 100 stops working.

Guess he means 2100. Is the cookie-"standard" really so f@#$%^& stupid
that it doesn't accept "real" dates? No way to use them with 4 digit years?

If that's indeed so, then +1. Otherwise: -1.

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: [PATCH] mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years (fwd)

Posted by Marc Slemko <ma...@worldgate.com>.
+1

On Sun, 2 Nov 1997, Dean Gaudet wrote:

> +1
> 
> Dean
> 
> ---------- Forwarded message ----------
> Date: 31 Oct 1997 21:27:51 -0000
> From: Paul Eggert <eg...@twinsun.com>
> To: apbugs@hyperreal.org
> Subject: mod_usertrack/1342: year-3000 bug in two-digit cookie expiration years
> 
> 
> >Number:         1342
> >Category:       mod_usertrack
> >Synopsis:       year-3000 bug in two-digit cookie expiration years
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       medium
> >Responsible:    apache
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   apache
> >Arrival-Date:   Fri Oct 31 13:30:01 PST 1997
> >Last-Modified:
> >Originator:     eggert@twinsun.com
> >Organization:
> apache
> >Release:        1.2.4
> >Environment:
> SunOS shade.twinsun.com 5.6 Generic sun4u sparc SUNW,Ultra-1
> >Description:
> There's a year-3000 bug in the two-digit years in cookie expiration dates.
> In 3000, tm_year is 200, so subtracting 100 stops working.
> 
> I know, I know, I'm being picky, but you'll thank me on Jan 1, 3000,
> when you're running Apache on your 64-bit time_t host!
> >How-To-Repeat:
> 
> >Fix:
> --- mod_usertrack.c	1997/03/07 14:15:45	1.2.4.0
> +++ mod_usertrack.c	1997/10/31 21:19:05	1.2.4.1
> @@ -176,5 +176,5 @@ void make_cookie(request_rec *r)
>  	      COOKIE_NAME, cookiebuf, days[tms->tm_wday],
>  	      tms->tm_mday, month_snames[tms->tm_mon],
> -	      (tms->tm_year >= 100) ? tms->tm_year - 100 : tms->tm_year,
> +	      tms->tm_year % 100,
>  	      tms->tm_hour, tms->tm_min, tms->tm_sec);
>      }
> %0
> >Audit-Trail:
> >Unformatted:
> 
>