-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
infinite loop when deleting a logged user from the database or disabling it #1798
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
Comments
Error occur with "FOSUserBundle" and "fos_user_registration_confirmation_enabled: true" option. |
@schmittjoh any news about this ? |
yeah .. removing the cookie seems like the right fix. |
Anyone working on a patch? |
…event infinite redirect loops to the login path (fixes symfony#1798).
…revent infinite redirect loops to the login path (fixes symfony#1798).
Commits ------- 4d80ebd Remove security token if user was deleted, is disabled or locked to prevent infinite redirect loops to the login path (fixes #1798). Discussion ---------- [2.1] Fix for issue 1798 Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: #1798 This is a simplified PR of #2528 for the master branch.
* 2.0: Added a class to the logs ol element to prevent hiding it when toggling an exception (fixes symfony#2589). Remove only the security token instead of the session cookie. Clear session cookie if user was deleted, is disabled or locked to prevent infinite redirect loops to the login path (fixes symfony#1798).
It seems like it still happens in RC2. Having a user disabled, trying to login... you get: [2012-08-31 21:17:56] security.INFO: Authentication request failed: User account is disabled. [] [] Then, enable it and try to login once more: [2012-08-31 21:18:22] security.INFO: User "[email protected]" has been authenticated successfully [] [] I still have to manually clear the cookie in the browser. Chrome 21 and IE9 acted the same on this. Everything is working BUT the enable/disable feature. NOTE: I am using PDO Session Storage... |
If I delete the logged user from the database (in my case, it was because I cleared the database by reloading the fixtures), the next request sent to the site will try to authenticate this user in the ContextListener (as the browser still has the cookie) and fail (as the user does not exist anymore). But the cookie is not deleted. This leads to some weird behavior in some cases:
If the cookie were removed when the user cannot be reloaded (not found or disabled), the next requests would match an anonymous token which would work.
The text was updated successfully, but these errors were encountered: