EllisLab text mark
Advanced Search
     
Sessions in database
Posted: 01 September 2007 06:50 AM   [ Ignore ]
Joined: 2007-08-25
44 posts

Whats the reason for putting sessions in the database when the ip is not checked and it couldnt be as there are dynamic ips. If someone changes his session value in the cookie and has the same user_agent data as the real owner of that session id? How the validation is actually done. It seems a bit unusable. Can you explain please? Thanks!

 
Posted: 01 September 2007 08:06 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-07-17
122 posts

If you don’t want him to edit the session values, you encrypt the cookie. Storing session in the database helps prevent session hijacking. With this technique one can use somebody else session, claiming hes identity.

 Signature 

Computers are incredibly fast, accurate and stupid. Human beings are incredibly slow, inaccurate and brilliant. Together they are powerful beyond imagination.

                                    A. Einstein