Skip to content

fix: cookie maxAge should be in seconds #765

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

hmnd
Copy link

@hmnd hmnd commented Apr 9, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Cookie maxAge is currently being set to 1000 years, since maxAge is specified in seconds, not milliseconds.

What is the new behavior?

Cookie maxAge is 365 days (1 year), below the maxAge limit of 400 days (https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-13#section-4.1.2.2)

@hmnd hmnd requested a review from a team as a code owner April 9, 2024 18:24
@kangmingtay
Copy link
Member

hi @hmnd, this is a non-issue as mentioned in this comment, will be closing the PR but please reopen it if you think that there's still a need for this

@hmnd
Copy link
Author

hmnd commented Apr 10, 2024

@kangmingtay the reason I brought it up is that it causes my Hono app to break. Hono adheres to RFC 6265 and throws when a cookie with a max age > 400 days is set.

Would setting to 400 days be a good compromise?

@hmnd
Copy link
Author

hmnd commented Apr 11, 2024

@kangmingtay I don't think I'm able to reopen, but I think this is still an issue for the reason above :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants