My understanding of how session works is below, I wonder if my understanding is correct.
- when user logs in, server creates
session_id-user_idmapping - server stores the
session_idin browser cookie - when user comes back, server looks up the cookie and reads the
sesison_id - server looks up
session_id-user_idmap and if it finds the mapping, user is logged in with theuser_id
Q1, Is my understanding correct?
Q2, If so, if someone can somehow insert session_id in his browser cookie, he can log in as someone else?
Q3, Using ssl prevents the above possibility?
Aucun commentaire:
Enregistrer un commentaire