-
Notifications
You must be signed in to change notification settings - Fork 35
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
Session cookies issue when upgrading from v1 to v2 #45
Comments
@viraptor Thanks for the input. Please submit a little more information about the runtime environment: node version, used libraries with their versions, some meaningful code fragments etc. |
Just for the record, I've tested scenarios with live v1->v2 migration (without encryption) and there were no errors, so I need a little more data to recreate the scenario. |
On behalf of @viraptor, we are using Node 16.16.0 These are our dependencies.
Our implementation is simple, no encryption: session = require('express-session')
MemcachedStore = require('connect-memcached')(session)
app.use(Middleware.sessionStore(
secret: process.env.EXPRESS_SESSION_SECRET,
resave: false,
saveUninitialized: false,
store: new MemcachedStore({
hosts: global.memcacheHosts,
prefix: 'api-gateway:session:'
})
)) Can I ask, in v2.0.0, it seems like the parseable string is not JSON parsed anymore. Is this a possible cause? v1.0.0...v2.0.0#diff-60110081947a55d72cbc180c13f565fd978c43ad0dbb393ff9719c654193b634L88 |
To my knowledge, in such case, Memcached client should directly pass These are just some fast observations, will run some experiments later. By the time don't hesitate to put some breakpoints or logs and dubug your specific case. |
Serialization of the cookie data may be at play here |
When trying to upgrade from v1 to v2 I get the following stacktrace when using the express-session:
I'm still trying to dig into the details, but the missing
session.cookies
doesn't look great.This is for code not using encryption.
The text was updated successfully, but these errors were encountered: