mweibel / connect-session-sequelize

Sequelize SessionStore for Express/Connect
211 stars 71 forks source link

Fix cookie.expires date assignment #118

Closed jvallenilla1 closed 3 years ago

jvallenilla1 commented 3 years ago

I caught an error while creating a new session with this library. I tried downloading the code and log it to see what could be the cause, and it showed to me that the cookie generated here always had a 'Invalid Date' value, resulting in a MySQL error after creating a new user or doing any other cookie or session validation.

Adding one more validation (!NaN(data.cookie.expires)) fixed this issue for me. Please, check if someone else have this problem and if this patch fixes it.

mweibel commented 3 years ago

I guess this change won't hurt - merging it.

mweibel commented 3 years ago

will release as soon as I got #119 merged/closed.