symfony/symfony — pull request #3658 by lancergr (2012-03-21 01:23:24+00:00)
Title: Use Flash Messages for avoid wrong redirect after login

This pull tries to fix a problem in firewall in which the user is not redirected properly.

Assuming that we have the following rules:
access_control:
- { path: ^/A, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/B, role: ROLE_USER }

A user goes to page /B and is forwarder/redirected to /login page.
If he does NOT login and choose to go to page /A and then again to page /login,
then, after a successfull login he will be redirected to /B instead of /A which was the last visited page.