diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-05-27 14:13:49 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | fdedbfd4a7fb547da0e0ce65c6180f74aad90691 (patch) | |
tree | 971c900113cae0d15987e2aedf2867ea8e00f324 /application/front/controller | |
parent | ef00f9d2033f6de11e71bf3a909399cae6f73a9f (diff) | |
download | Shaarli-fdedbfd4a7fb547da0e0ce65c6180f74aad90691.tar.gz Shaarli-fdedbfd4a7fb547da0e0ce65c6180f74aad90691.tar.zst Shaarli-fdedbfd4a7fb547da0e0ce65c6180f74aad90691.zip |
Test ShaarliAdminController
Diffstat (limited to 'application/front/controller')
-rw-r--r-- | application/front/controller/admin/ShaarliAdminController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/application/front/controller/admin/ShaarliAdminController.php b/application/front/controller/admin/ShaarliAdminController.php index 3385006c..3bc5bb6b 100644 --- a/application/front/controller/admin/ShaarliAdminController.php +++ b/application/front/controller/admin/ShaarliAdminController.php | |||
@@ -34,11 +34,13 @@ abstract class ShaarliAdminController extends ShaarliVisitorController | |||
34 | /** | 34 | /** |
35 | * Any persistent action to the config or data store must check the XSRF token validity. | 35 | * Any persistent action to the config or data store must check the XSRF token validity. |
36 | */ | 36 | */ |
37 | protected function checkToken(Request $request): void | 37 | protected function checkToken(Request $request): bool |
38 | { | 38 | { |
39 | if (!$this->container->sessionManager->checkToken($request->getParam('token'))) { | 39 | if (!$this->container->sessionManager->checkToken($request->getParam('token'))) { |
40 | throw new WrongTokenException(); | 40 | throw new WrongTokenException(); |
41 | } | 41 | } |
42 | |||
43 | return true; | ||
42 | } | 44 | } |
43 | 45 | ||
44 | /** | 46 | /** |