Use Url:post() to get the $_POST variable (allows common security checks/filtering for the POST data)

This commit is contained in:
Matias Griese
2018-09-17 09:54:27 +03:00
parent 5fb772d87e
commit ec93b823ca
3 changed files with 6 additions and 3 deletions

View File

@@ -360,7 +360,7 @@ class AdminPlugin extends Plugin
}
// Make local copy of POST.
$post = !empty($_POST) ? $_POST : [];
$post = $this->grav['uri']->post();
// Handle tasks.
$this->admin->task = $task = !empty($post['task']) ? $post['task'] : $this->uri->param('task');