Reputation: 237
The input originated from user input, but it's already been sanitized.
Better to be safe than sorry or just over-kill?
Upvotes: 0
Views: 630
Reputation: 1694
$_SESSION
is basically the equivalent of your code making a text file for every user (identifying different users by magic, for explanation's sake), and storing some variables in that text file. Except for your code or something else on your server, nothing should be modifying the $_SESSION
. So, if you make a habit of sanitizing everything before storing it in $_SESSION
, you don't have to sanitize it again.
Upvotes: 4