fix: [appcontroller] Validate form for all actions unless index

pull/41/head
mokaddem 2021-03-19 11:14:02 +01:00
parent 0c54d60a13
commit a5e1e39671
1 changed files with 3 additions and 4 deletions

View File

@ -108,11 +108,10 @@ class AppController extends Controller
throw new MethodNotAllowedException(__('Invalid user credentials.'));
}
// if ($this->request->getParam('action') === 'index') {
// $this->Security->setConfig('validatePost', false);
// }
if ($this->request->getParam('action') === 'index') {
$this->Security->setConfig('validatePost', false);
}
$this->Security->setConfig('unlockedActions', ['index']);
$this->Security->setConfig('validatePost', false);
$this->ACL->checkAccess();
$this->set('menu', $this->ACL->getMenu());