I save some important info in $_SESSION, not in $_COOKIE. So, my question, is it dangerous? Or is it protected from malicious users trying to edit it and I’m fine?
Thank you.
By the way, is it possible also to edit $_COOKIE? I heard yes, but if yes, then how?
$_SESSIONis stored server-side. The best a hacker could do would be substitute another user’s session for the existing session, but the hacker could not insert arbitrary data into$_SESSION.$_COOKIEis, however, stored client-side, so a hacker can insert arbitrary data into the cookie, by just editing the cookie.