jeudi 16 avril 2015

Session ID is duplicated, swapping the user details

I have build an e-commerce website using express.js The authentication method used is passport.js. We store the cookie with all the information we needed in redis.


Everything was fine until we started driving more traffic.


Now the problem


When user A comes to site, logs in make a purchase once in two days or once in a day 2-3 customer details are wrong.


User A comes to site and make a purchase. The email and address of the user A sometimes becomes the email and address of user B


We cannot easily replicate this as this happens only once in 50 purchases.or sometimes twice in 50 purchases.


So I had to call all my contacts and check what is the wrong thing we have done. And curiously one guy replied me that he also have the same issue. He is saying it the problem with passport.js, and he wrote custom authentication method to remove passport and till now he has not faced any issue.He also uses exactly my set up. NODE-EXPRESS-REDIS


I am quoting his words here


Whenever a user logs in from one computer, open the site in another computer then refresh the page , You can see the logged in details of the first user in second computer, and this issue is not frequent but it comes once in a while


Please anyone help in solving this issue


Aucun commentaire:

Enregistrer un commentaire