-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No guarantee of session isolation with Symfony #163
Comments
@mathieudz this is one of the dangers of switching to a long running process like react-php/php-pm that manages more than one request. Developers need to be fully aware that the global state can't be trusted anymore. Not sure php-pm can (or should) do something about it. We've had some recent discussions about how far should we (php-pm) try to go in fixing weird stuff caused by the long-running processes. How would this be best addressed? |
I agree this is an inherent problem, but the security consequences of this specific case are huge. |
FYI, this is my workaround:
|
After upgrade to Symfony 5.1, sessions are again leaking despite my workaround. |
@mathieudz would be great to have a repro test-case, I'm using php-pm in a stateless REST api, so no sessions on our end to see what might be happening. |
I'm still trying to figure out what causes the leak. The only way to reproduce it currently is to switch production to v5.1 and wait a few hours until it occurs (and all hell breaks loose). |
I'm back on 5.1 and the problem does not occur anymore. No way to reproduce it anymore. |
Currently PHP PM relies on Symfony to close the sessions properly. I already had two instances where that did not happen:
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.
The text was updated successfully, but these errors were encountered: