NetworkCookie: fix date validity check
* January 1st 1970 is a perfectly valid expiration date for a cookie, and shouldn't magically turn it into a session cookie.
This commit is contained in:
@@ -232,7 +232,7 @@ BNetworkCookie::SetExpirationDate(time_t expireDate)
|
||||
BNetworkCookie&
|
||||
BNetworkCookie::SetExpirationDate(BDateTime& expireDate)
|
||||
{
|
||||
if (expireDate.Time_t() <= 0) {
|
||||
if (!expireDate.IsValid()) {
|
||||
fExpiration.SetTime_t(0);
|
||||
fSessionCookie = true;
|
||||
fExpirationStringValid = false;
|
||||
|
||||
Reference in New Issue
Block a user