Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically Login using session id stored in cookie

Since php login application uses session id(one for each user) which is stored in cookie which is send as header information to server that allows the user to get automatically logged in(assuming that the user is already logged in some another tab in same browser lets say Chrome).

My question is if I store that user session id cookie information in another browser(lets say Firefox) and open the same application, will the user will get automatically logged in or not.

Or if someone finds out my session id and store them in its browser will the application will allow the user to login or not.

like image 988
Anand Gupta Avatar asked Oct 19 '25 05:10

Anand Gupta


1 Answers

Take a look at session hijacking.

If somebody steals your session cookie, and you are still logged into the website, then yes. The attacker can log in using that session cookie.

like image 63
Jon Tan Avatar answered Oct 20 '25 20:10

Jon Tan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!