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
This commit is contained in:
Jay Satiro 2016-03-05 13:35:17 -05:00
parent 33a0a926c5
commit 20de9b4f09
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}