Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies with expiry time set to epoch zero are matched and not expired #455

Closed
faulpeltz opened this issue Sep 14, 2024 · 3 comments · Fixed by #457
Closed

Cookies with expiry time set to epoch zero are matched and not expired #455

faulpeltz opened this issue Sep 14, 2024 · 3 comments · Fixed by #457
Assignees
Labels
patch We expect this work to be a patch level change

Comments

@faulpeltz
Copy link

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 for undefined not just !expiryTime

if (expireCheck && expiryTime && expiryTime <= now) {

@colincasey colincasey added the patch We expect this work to be a patch level change label Sep 16, 2024
@colincasey colincasey self-assigned this Sep 16, 2024
@colincasey
Copy link
Contributor

Thanks for the filing this issue @faulpeltz.

@domenic
Copy link

domenic commented Dec 20, 2024

Hi! I'd like to gently request that a new version be released with this regression fix incorporated. It seems there have been a lot of meta-changes around dependencies, package publishing workflow, etc. since this was merged in September, but we still haven't seen an npm release with this fix.

For jsdom users, this is putting us between a rock and a hard place, where we can either use v4 which has deprecation warnings and working cookie deletion functionality, or v5 which has no deprecation warnings but broken cookie deletion abilities.

Of course, I understand very much that this is a spare-time project and you all are probably pretty busy. If you don't have time, I understand; I'm often that way with jsdom myself. But just in case it would make a difference, I wanted to drop a note letting you know how appreciated a new release would be.

Thanks!

@colincasey
Copy link
Contributor

Hi @domenic, thanks for the gentle poke. Myself and the other maintainers invested most of our time after the previous release in setting up automation to make it easier for us to publish new versions more frequently and avoid this exact situation. Then we all got swamped with end of the year work and never got the chance to test this automation fully 😅

I'm going to be trying out our new publishing process this week. If that goes smoothly then such a large gap in releases shouldn't happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch We expect this work to be a patch level change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants