Received: (qmail 17424 invoked by uid 2012); 31 Oct 1997 21:27:51 -0000 Message-Id: <19971031212751.17423.qmail@hyperreal.org> Date: 31 Oct 1997 21:27:51 -0000 From: Paul Eggert Reply-To: eggert@twinsun.com To: apbugs@hyperreal.org Subject: year-3000 bug in two-digit cookie expiration years X-Send-Pr-Version: 3.2 >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: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Oct 31 13:30:01 PST 1997 >Last-Modified: Wed Nov 5 03:24:41 PST 1997 >Originator: eggert@twinsun.com >Organization: >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: State-Changed-From-To: open-closed State-Changed-By: dgaudet State-Changed-When: Wed Nov 5 03:24:41 PST 1997 State-Changed-Why: Actually I think it's a year 2100 bug ... but we applied yer patch to 1.3b3 anyhow :) Dean >Unformatted: