Open
Description
Currently PHP PM relies on Symfony to close the sessions properly. I already had two instances where that did not happen:
- a bug where the session storage changed serializing method (PHP vs. igbinary) and thus crashed
- a bundle (SchebTwoFactorBundle) that reads the session "on finish request", effectively reopening the session after SessionListener closed it.
Of course, these bugs need to be solved, but they should not be able to cause security issues. Luckily due to extensive use of session bound CSRF-like tokens, the website was hardly usable anymore and no harm was done. Otherwise, sessions would have leaked to other users, e.g. a regular user could have used an admin's session.
I suggest there should be some kind of session cleanup after each request. The only way to do that seems to be the save() method on the session.