fix: [internal] Destroy session just when session is started

pull/6593/head
Jakub Onderka 2020-11-16 14:58:12 +01:00
parent 09c578d2c3
commit c51cd36ac3
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}
}