From 728a43285056c54bb1c0ec622ae9431f487d3a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 10 Aug 2015 22:37:56 +0200 Subject: fix #1311, redirect after login --- app/config/security.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/security.yml b/app/config/security.yml index 37236d40..acc86984 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -37,9 +37,9 @@ security: post_only: true - always_use_default_target_path: true + always_use_default_target_path: false default_target_path: / - target_path_parameter: redirect_url + target_path_parameter: _target_path use_referer: true failure_path: null -- cgit v1.2.3 From 7fc14130c706fae27c5643a016b23de2bf29910d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 12 Aug 2015 13:18:39 +0200 Subject: add test --- .../Tests/Controller/SecurityControllerTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php index a51e836d..759ef01b 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php @@ -40,6 +40,25 @@ class SecurityControllerTest extends WallabagCoreTestCase $this->assertContains('Bad credentials', $client->getResponse()->getContent()); } + public function testRedirectionAfterLogin() + { + $client = $this->getClient(); + $client->followRedirects(); + + $crawler = $client->request('GET', '/config'); + + $form = $crawler->filter('button[type=submit]')->form(); + + $data = array( + '_username' => 'admin', + '_password' => 'mypassword', + ); + + $client->submit($form, $data); + + $this->assertContains('RSS', $client->getResponse()->getContent()); + } + public function testForgotPassword() { $client = $this->getClient(); -- cgit v1.2.3