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

Handle signed cookies #222

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

JohanManders
Copy link
Contributor

Before this commit, when using signed: true inside the cookie settings for fastify-secure-session, the cookie was passed without unsigning the cookie, so it would always be invalid. After this commit, signed sessions should work fine.

I added a test file to show it works and that tampering the cookie will invalidate a signed cookie. The test will fail in the old version.

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 854b84c into fastify:master Apr 12, 2024
19 checks passed
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Successfully merging this pull request may close these issues.

None yet

3 participants