Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
And I will add, that somebody forging a cookie (or if it's enabled, passing an PHPSESSID= parameter) with a valid id can hijack the session.
I'd say that sessions are a more flexible than cookies, but not that much safer.
You still have to be careful what you save in it, and do more check depending the security level you need.
For instance, you could store the browser ip in a db and the session, and check it on each page load.
If you see that the ip changed between 2 calls, you invalidate the session, and ask the user to log back in.
__________________
Only a biker knows why a dog sticks his head out the window.
|