From: Jay Satiro Date: Sat, 5 Mar 2016 18:35:17 +0000 (-0500) Subject: cookie: Don't expire session cookies in remove_expired X-Git-Tag: curl-7_48_0~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20de9b4f09;p=thirdparty%2Fcurl.git cookie: Don't expire session cookies in remove_expired Prior to this change cookies with an expiry date that failed parsing and were converted to session cookies could be purged in remove_expired. Bug: https://github.com/curl/curl/issues/697 Reported-by: Seth Mos --- diff --git a/lib/cookie.c b/lib/cookie.c index 1fd97c013d..558b6a7f26 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -309,7 +309,7 @@ static void remove_expired(struct CookieInfo *cookies) pv = NULL; while(co) { nx = co->next; - if((co->expirestr || co->maxage) && co->expires < now) { + if(co->expires && co->expires < now) { if(co == cookies->cookies) { cookies->cookies = co->next; }