ID: 45141
Updated by: [EMAIL PROTECTED]
Reported By: php at evilcode dot net
-Status: Open
+Status: Assigned
-Bug Type: Feature/Change Request
+Bug Type: Date/time related
Operating System: FreeBSD/Linux
PHP Version: 5.2.6
-Assigned To:
+Assigned To: derick
New Comment:
The formatting is actually a bug... I've started optimizing the
algorithm but haven't finished yet.
Previous Comments:
------------------------------------------------------------------------
[2008-05-31 03:21:01] php at evilcode dot net
Description:
------------
setcookie() will happily produce expires times with years greater than
4 digits in length. This violates various RFC's and can also lead to
unexpectedly hung scripts (especially on 64-bit).
Reproduce code:
---------------
This works fine on 32-bit, but will keep the script looping effectively
forever formatting the date as GMT on 64-bit.
setcookie('test', 'testing', PHP_INT_MAX);
Sample patch: http://evilcode.net/sjg/php5.2.6-setcookie-head.c.patch
This may not be the right place for this, as there are probably other
violators as well. A more general/generic fix may be in order.
Expected result:
----------------
Date output should be trimmed to the end of year 9999, possibly a
warning presented.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45141&edit=1