Soft PHP MVC tackles session security with anti-fixation and flash data tools
The Soft PHP MVC framework uses a singleton class called SessionStorage to manage all aspects of web session security in PHP applications. It applies four key cookie flags — HttpOnly, strict mode, Secure, and SameSite=Lax — to block common attacks such as XSS-based session hijacking, session fixation, and CSRF. The framework also distinguishes between session lifetime, the absolute maximum duration, and inactivity timeout, which expires a session after a period of no user activity. A LAST_ACTIVITY timestamp is updated on every request and checked against the configured timeout to protect shared-device scenarios. The flash session pattern is also supported to safely pass one-time messages across redirects after form submissions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in