aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-05-27 14:13:49 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commitfdedbfd4a7fb547da0e0ce65c6180f74aad90691 (patch)
tree971c900113cae0d15987e2aedf2867ea8e00f324 /application/front/controller
parentef00f9d2033f6de11e71bf3a909399cae6f73a9f (diff)
downloadShaarli-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.php4
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 /**