What's the point of changing session ids on login?
Been having some issue's with race conditions on multiple ajax requests happening concurrently and wondering if anyone know's why the session id is changed on log in?
That would make sense to me if there was only a session when the user was logged in, but I believe Laravel always has a session regardless of whether the user is authenticated or not so based on that I don't get why the session id is changed on login.
@bashy, You could keep the session id you had before logging in once you log in and just append the "logged in" information to that session id and go on your merry way. However, the danger here is session hijacking. If someone is sniffing your wifi when you login, they will be able to pretend they are you and be logged in as well. But if you change the session id, it offers another layer of security, making it harder for the perpetrator to hijack your session. I don't know exactly how it all works, but I understand this to be a best practice and that is [one of] the reason[s] why.
@peter-mw, you need to start your own thread. You won't get good answers posting your question at the end of another person's thread. Someone should be able to help you there :)
hey can anyone tell me, on login page of my website if i change the original session id to random one but with same length of 41 characters and able to login. then would that count as a vulnerability.