diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-25 10:59:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 10:59:51 +0200 |
commit | 585fc700fa711170df711990f51f226ecd831ef7 (patch) | |
tree | f98ac03d106b67b17d9bbc3803e76fb9f8b7297f /tests/front/controller/admin/SessionFilterControllerTest.php | |
parent | 85b972baf67c61ebabf1ce332358e4dfd2456a4e (diff) | |
parent | abe033be855f76fde9e8576ce36460fbb23b1e57 (diff) | |
download | Shaarli-585fc700fa711170df711990f51f226ecd831ef7.tar.gz Shaarli-585fc700fa711170df711990f51f226ecd831ef7.tar.zst Shaarli-585fc700fa711170df711990f51f226ecd831ef7.zip |
Merge pull request #1560 from ArthurHoaro/fix/redirect-wrong-path
Fix invalid redirection using the path of an external domain
Diffstat (limited to 'tests/front/controller/admin/SessionFilterControllerTest.php')
-rw-r--r-- | tests/front/controller/admin/SessionFilterControllerTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/front/controller/admin/SessionFilterControllerTest.php b/tests/front/controller/admin/SessionFilterControllerTest.php index d306c6e9..c4253167 100644 --- a/tests/front/controller/admin/SessionFilterControllerTest.php +++ b/tests/front/controller/admin/SessionFilterControllerTest.php | |||
@@ -31,7 +31,7 @@ class SessionFilterControllerTest extends TestCase | |||
31 | { | 31 | { |
32 | $arg = ['visibility' => 'private']; | 32 | $arg = ['visibility' => 'private']; |
33 | 33 | ||
34 | $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; | 34 | $this->container->environment['HTTP_REFERER'] = 'http://shaarli/subfolder/controller/?searchtag=abc'; |
35 | 35 | ||
36 | $this->container->loginManager->method('isLoggedIn')->willReturn(true); | 36 | $this->container->loginManager->method('isLoggedIn')->willReturn(true); |
37 | $this->container->sessionManager | 37 | $this->container->sessionManager |
@@ -57,7 +57,7 @@ class SessionFilterControllerTest extends TestCase | |||
57 | { | 57 | { |
58 | $arg = ['visibility' => 'private']; | 58 | $arg = ['visibility' => 'private']; |
59 | 59 | ||
60 | $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; | 60 | $this->container->environment['HTTP_REFERER'] = 'http://shaarli/subfolder/controller/?searchtag=abc'; |
61 | 61 | ||
62 | $this->container->loginManager->method('isLoggedIn')->willReturn(true); | 62 | $this->container->loginManager->method('isLoggedIn')->willReturn(true); |
63 | $this->container->sessionManager | 63 | $this->container->sessionManager |
@@ -121,7 +121,7 @@ class SessionFilterControllerTest extends TestCase | |||
121 | { | 121 | { |
122 | $arg = ['visibility' => 'test']; | 122 | $arg = ['visibility' => 'test']; |
123 | 123 | ||
124 | $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; | 124 | $this->container->environment['HTTP_REFERER'] = 'http://shaarli/subfolder/controller/?searchtag=abc'; |
125 | 125 | ||
126 | $this->container->loginManager->method('isLoggedIn')->willReturn(true); | 126 | $this->container->loginManager->method('isLoggedIn')->willReturn(true); |
127 | $this->container->sessionManager | 127 | $this->container->sessionManager |
@@ -151,7 +151,7 @@ class SessionFilterControllerTest extends TestCase | |||
151 | { | 151 | { |
152 | $arg = ['visibility' => 'test']; | 152 | $arg = ['visibility' => 'test']; |
153 | 153 | ||
154 | $this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc']; | 154 | $this->container->environment['HTTP_REFERER'] = 'http://shaarli/subfolder/controller/?searchtag=abc'; |
155 | 155 | ||
156 | $this->container->loginManager = $this->createMock(LoginManager::class); | 156 | $this->container->loginManager = $this->createMock(LoginManager::class); |
157 | $this->container->loginManager->method('isLoggedIn')->willReturn(false); | 157 | $this->container->loginManager->method('isLoggedIn')->willReturn(false); |