Hey everybody- first time poster here.
So I'm getting close to completing a shopping cart app that's been under construction for over a year, and I'm trying to figure out just how much information is safe to store in the $_SESSION variable.
If my understanding of the $_SESSION variable is correct, generally you shouldn't store critical information in it because if anyone is listening in when it's set they can use the id to access any information stored in the variable.
Obviously my payment page is over a secure connection, and I'm not storing the actual credit card information in the $_SESSION variable (I'm actually not storing it anywhere; once the user posts it to the script it goes directly to the API), but I would like to be able to store an obscured credit card number (i.e. ************1234) so that the user can see which card they're using after they enter it, and I don't have to keep posting it to every page in the checkout process. I'll be unsetting this session variable once the confirmation page is displayed, so it won't be just sitting there forever.
How much of a risk is this? It seems that the last four digits of a credit card are pretty low- risk; they're constantly emailed over unsecure connections, etc. -while eventually I plan on instating a more secure session system (which I have further questions about), for now am I okay with this, or should I just forgo this luxury?
Thanks!









Bookmarks