Description

When a cookie object is created using the Zend_Http_Cookie::fromString($cookieStr, $refUri) function, and $cookieStr contains an expiration timestamp that is invalid according to strtotime(), Zend_Http_Cookie will treat the cookie as expired. A better behavior would be to never expire the cookie, as strtotime() can reject certain dates that are too far in the future.

As an example, I had a web server that identified itself as Microsoft-IIS/6.0 return a cookie with an expiration timestamp of "Fri, 01-Mar-2109 00:19:21 GMT", which Zend_Http_Cookie treated as expired.

I am attaching a patch that fixes this issue.

Comments

Posted by Shahar Evron (shahar) on 2009-07-26T01:42:28.000+0000

Are you sure this still happens? There was a patch added a while back to use Zend_Date if strtotime fails. This should have worked around this problem.
If this still happens, let me know what PHP version you are running, on what system (32 bit or 64 bit) and what ZF version of course.