You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parser is looping on date's tokens : "Sun", "29", "Mar", "2015", "15:13:10", "GMT"
The parser is using the tokens to modify a date object : new Date();
but this date object is initialized with the current date, (currently "February")
so, when processing "29", it tries to set day 29 of month february which cause the bug :
date before setUTCDate() : Fri Feb 27 2015 16:31:16 GMT+0100 (CET)
date.setUTCDate(result[1]);
date after setUTCDate() : Sun Mar 01 2015 16:31:16 GMT+0100 (CET)
``
The text was updated successfully, but these errors were encountered:
Every date on a day 29, 30 or 31 are wrongly parsed if the current date month has less days than the parsed one.
Small exemple of a cookie expiring on Mars 29 parsed Mars 01 :
This is a bug inside parseDate() ( https://github.com/goinstant/tough-cookie/blob/master/lib/cookie.js#L91 )
The parser is looping on date's tokens : "Sun", "29", "Mar", "2015", "15:13:10", "GMT"
The parser is using the tokens to modify a date object : new Date();
but this date object is initialized with the current date, (currently "February")
so, when processing "29", it tries to set day 29 of month february which cause the bug :
The text was updated successfully, but these errors were encountered: