diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-08-12 13:21:16 +0200 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-08-12 13:21:16 +0200 |
commit | a15692b1b736a6a1d3c50a5daffe08c16e6cc93b (patch) | |
tree | 81c6ab895fa3a6348a6e298c75c9cc45ca88112e | |
parent | 3e1f25e22fb02241017c68944215138c17678270 (diff) | |
parent | 7fc14130c706fae27c5643a016b23de2bf29910d (diff) | |
download | wallabag-a15692b1b736a6a1d3c50a5daffe08c16e6cc93b.tar.gz wallabag-a15692b1b736a6a1d3c50a5daffe08c16e6cc93b.tar.zst wallabag-a15692b1b736a6a1d3c50a5daffe08c16e6cc93b.zip |
Merge pull request #1312 from wallabag/v2-fix-1311
fix #1311, redirect after login
-rw-r--r-- | app/config/security.yml | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php | 19 |
2 files changed, 21 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: | |||
37 | 37 | ||
38 | post_only: true | 38 | post_only: true |
39 | 39 | ||
40 | always_use_default_target_path: true | 40 | always_use_default_target_path: false |
41 | default_target_path: / | 41 | default_target_path: / |
42 | target_path_parameter: redirect_url | 42 | target_path_parameter: _target_path |
43 | use_referer: true | 43 | use_referer: true |
44 | 44 | ||
45 | failure_path: null | 45 | failure_path: null |
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 | |||
40 | $this->assertContains('Bad credentials', $client->getResponse()->getContent()); | 40 | $this->assertContains('Bad credentials', $client->getResponse()->getContent()); |
41 | } | 41 | } |
42 | 42 | ||
43 | public function testRedirectionAfterLogin() | ||
44 | { | ||
45 | $client = $this->getClient(); | ||
46 | $client->followRedirects(); | ||
47 | |||
48 | $crawler = $client->request('GET', '/config'); | ||
49 | |||
50 | $form = $crawler->filter('button[type=submit]')->form(); | ||
51 | |||
52 | $data = array( | ||
53 | '_username' => 'admin', | ||
54 | '_password' => 'mypassword', | ||
55 | ); | ||
56 | |||
57 | $client->submit($form, $data); | ||
58 | |||
59 | $this->assertContains('RSS', $client->getResponse()->getContent()); | ||
60 | } | ||
61 | |||
43 | public function testForgotPassword() | 62 | public function testForgotPassword() |
44 | { | 63 | { |
45 | $client = $this->getClient(); | 64 | $client = $this->getClient(); |