So, I just finished coding the login script for an upcoming project. It relies on a session cookie with a value that is (essentially) the user's password, hashed. I'm worried that someone could steal the value of this cookie and then create "poisoned" cookies with that value whenever they want to impersonate their victim. One way to mitigate this would be to salt the password hash with something (like the day's date) that would make the cookie only work for a limited time. How do other coders take care of this? Or is it considered acceptable to use a cookie that could last forever?
Salting with the user's IP will not work, because most of my visitors connect via Tor...
Post edited at 8:24 pm on Aug. 15, 2008 by Mediocre
-------
Incest and bestiality are neat.