Closed faulpeltz closed 3 weeks ago
If the server sends a cookie with expiry time set to epoch zero (1970-01-01T00:00:00.000Z), the cookie is then returned in getCookies(url) even though "expire" is set to true (the default)
getCookies(url)
This is because expiryTime here should be checked for undefined not just !expiryTime https://github.com/salesforce/tough-cookie/blob/1a71340594beac95c4ea10fefe4eb79fdfead5c2/lib/cookie/cookieJar.ts#L940
expiryTime
undefined
!expiryTime
Thanks for the filing this issue @faulpeltz.
If the server sends a cookie with expiry time set to epoch zero (1970-01-01T00:00:00.000Z), the cookie is then returned in
getCookies(url)
even though "expire" is set to true (the default)This is because
expiryTime
here should be checked forundefined
not just!expiryTime
https://github.com/salesforce/tough-cookie/blob/1a71340594beac95c4ea10fefe4eb79fdfead5c2/lib/cookie/cookieJar.ts#L940