What should be stored in a session and what in a cookie? -
I'm thinking, are there any guidelines or best practice when using sessions and cookies? What do they want and what should be kept? Thanks!
These documents are good on security issues with session cookies, and how to get around them is .
In summary, you place a secret key on the server. With this key you can calculate a safe hash on the secret key, a time stamp, and any data you want in the cookie. You include data in secure hash, time stamp and cookie.
When you receive a request, you can validate that you expect a signature so someone has compromised the cookie content.
Comments
Post a Comment