As Explained in earlier post about the PHP Session - Starting Session, Modifying Session and Deleting Session,session stores important information. Most of the times Session have very important information about the user. User data, like Id, username, and many more.
Session might also have the Shopping Cart information. All these information are very valuable and sensitive. So proper methods are need to implemented to keep the session secure.
Here are some of the ways you can keep your session safe.
Session might also have the Shopping Cart information. All these information are very valuable and sensitive. So proper methods are need to implemented to keep the session secure.
Here are some of the ways you can keep your session safe.
- Use SSL when authenticating users or performing sensitive operations.
- Regenerate the session id whenever the security level changes (such as logging in). You can even regenerate the session id every request if you wish.
- Have sessions time out
- Don't use register globals