From c51cd36ac35dcfa45deab3fd592bba025765f1af Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 16 Nov 2020 14:58:12 +0100 Subject: [PATCH] fix: [internal] Destroy session just when session is started --- app/Controller/AppController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php index 36981fbd4..562cef9ed 100755 --- a/app/Controller/AppController.php +++ b/app/Controller/AppController.php @@ -586,7 +586,7 @@ class AppController extends Controller public function afterFilter() { - if ($this->isApiAuthed && $this->_isRest()) { + if ($this->isApiAuthed && $this->_isRest() && $this->Session->started()) { $this->Session->destroy(); } }