From c6874599b9363f44b06d49633b292d755807cecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Tue, 15 Aug 2017 11:33:47 +0200 Subject: [PATCH] Prevent conflict between CsrfComponent and CsrfProtectionMiddleware --- src/Controller/AppController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index 1b0933342..40b1bf4bd 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -28,7 +28,9 @@ public function initialize() { parent::initialize(); $this->loadComponent('Security'); - $this->loadComponent('Csrf'); + if ($this->request->getParam('_csrfToken') === false) { + $this->loadComponent('Csrf'); + } $this->loadComponent('CakeDC/Users.UsersAuth'); } }