Welcome Guest, Not a member yet? Register   Sign In
Is ci/sessions safe to use?
#1

[eluser]walrus_lt[/eluser]
Hi. Is ci/sessions safe to use? I heard that ci/session saves information in user's cookie. So...

If i do:
Code:
$this->session->set_userdata(array('id'=>$id, 'nick'=>$nick))

In another place:
Code:
if ($this->session->userdata('id') == '') die('NOT LOGED IN')

Can it be hacked if hacker creates cookie in his browser with id=1?
#2

[eluser]pistolPete[/eluser]
Just encrypt the cookie: http://ellislab.com/codeigniter/user-gui...sions.html




Theme © iAndrew 2016 - Forum software by © MyBB