-
-
Notifications
You must be signed in to change notification settings - Fork 987
Use a nonce for cookie regeneration #627
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
base: master
Are you sure you want to change the base?
Conversation
@dougwilson @brian-learningpool rereview please |
Hi Guys any news on this ? |
@mkawalec, apologies for the delay in this, I completely missed the notification that you had updated the PR. Your changes look good but there are conflicts in a couple of files. Also, I'm just a long-time fan and user of express-session, I don't have contributor access so I'm not sure what my approval is worth. |
Will rebase soon, hopefully we'll get this across the finish line in 2019 :D |
9d2e29b
to
408229e
Compare
This implements #425 by setting up an extra nonce cookie when
regenerate
is set totrue
. That nonce is validated against the previous value and refreshed on each request. This adds an additional write per request to the cookie store, regardless of if the state was modified or not.Also fixes the
getCookie
method in tests to look at all the cookies set in a response, not just the first one.