{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15712","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15712/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15712/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15712/events","html_url":"https://github.com/symfony/symfony/issues/15712","id":105230029,"number":15712,"title":"Security login redirect to fragment (using ESI for example)","user":{"login":"nyroDev","id":265662,"avatar_url":"https://avatars.githubusercontent.com/u/265662?v=3","gravatar_id":"","url":"https://api.github.com/users/nyroDev","html_url":"https://github.com/nyroDev","followers_url":"https://api.github.com/users/nyroDev/followers","following_url":"https://api.github.com/users/nyroDev/following{/other_user}","gists_url":"https://api.github.com/users/nyroDev/gists{/gist_id}","starred_url":"https://api.github.com/users/nyroDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyroDev/subscriptions","organizations_url":"https://api.github.com/users/nyroDev/orgs","repos_url":"https://api.github.com/users/nyroDev/repos","events_url":"https://api.github.com/users/nyroDev/events{/privacy}","received_events_url":"https://api.github.com/users/nyroDev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Security","name":"Security","color":"DDDDDD"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Unconfirmed","name":"Unconfirmed","color":"444444"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-07T14:54:12Z","updated_at":"2015-10-18T12:25:10Z","closed_at":"2015-10-18T12:25:10Z","body":"The login page use a global layout, which includes fragment using ESI (or SSI).\r\nWhen the login success, the redirect is made to the internal fragment URI.\r\n\r\nAfter a little search on it, my guess is because the fragment URI is catched in \r\n**Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener**\r\nas normal URL, and is then saved in session on the *setTargetPath* function here:\r\n\r\n        if ($request->hasSession() && $request->isMethodSafe() && !$request->isXmlHttpRequest()) {\r\n            $request->getSession()->set('_security.'.$this->providerKey.'.target_path', $request->getUri());\r\n        }\r\n\r\nAdding a test to check if the URI is a fragment might do the trick, but I may missing some points here."},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/149006852","html_url":"https://github.com/symfony/symfony/issues/15712#issuecomment-149006852","issue_url":"https://api.github.com/repos/symfony/symfony/issues/15712","id":149006852,"user":{"login":"xabbuh","id":1957048,"avatar_url":"https://avatars.githubusercontent.com/u/1957048?v=3","gravatar_id":"","url":"https://api.github.com/users/xabbuh","html_url":"https://github.com/xabbuh","followers_url":"https://api.github.com/users/xabbuh/followers","following_url":"https://api.github.com/users/xabbuh/following{/other_user}","gists_url":"https://api.github.com/users/xabbuh/gists{/gist_id}","starred_url":"https://api.github.com/users/xabbuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabbuh/subscriptions","organizations_url":"https://api.github.com/users/xabbuh/orgs","repos_url":"https://api.github.com/users/xabbuh/repos","events_url":"https://api.github.com/users/xabbuh/events{/privacy}","received_events_url":"https://api.github.com/users/xabbuh/received_events","type":"User","site_admin":false},"created_at":"2015-10-18T12:25:10Z","updated_at":"2015-10-18T12:25:10Z","body":"closing due to the lack of feedback\r\n\r\n@nyroDev Please feel free to comment if you can provide more information and we can consider to reopen then."}}