Welcome Guest, Not a member yet? Register   Sign In
Cookies [sess_use_database] question
#1

[eluser]comex[/eluser]
Hello,
I've been using the sess_use_database option alongside with sess_encrypt_cookie for a while. As the site is about to go live I wondered what data was being kept in the cookie and so I turned encryption off and took a look.
This is what the cookie contained:
Code:
a:4:{s:10:"session_id";s:32:"b1e613a9ecce51b4c7e8d84762c8217f";s:10:"ip_address";s:9:"127.0.0.1";s:10:"user_agent";s:50:"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8";s:13:"last_activity";s:10:"1251646313";}a46f1c09efa2f2b651a729b8a31d25ad

Is there any way to make codeigniter to only save the session_id part in the cookie? And what corresponds to the "a46f1c09efa2f2b651a729b8a31d25ad"?
I'm hoping that it isn't my userdata =)

Thank you!
#2

[eluser]Aken[/eluser]
There's no option to save only the session ID. You could modify to your liking, though.

Not exactly sure what the last string has to do with. Perhaps part of the serializing process? I'd have to tinker and I'm not around my dev platform.
#3

[eluser]WanWizard[/eluser]
The MD5 hash at the end of the cookie is an anti-tampering measure, because you have created an unencrypted cookie. The session library adds this hash to make sure the contents hasn't been modified (either by the end-user or in transit)...
#4

[eluser]comex[/eluser]
Thank you =)




Theme © iAndrew 2016 - Forum software by © MyBB