mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
Use Grav nonce functionality
This commit is contained in:
@@ -86,6 +86,11 @@ class AdminController
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
if (!Utils::verifyNonce($this->post['admin-nonce'], 'admin-post-blueprints')) {
|
||||
$this->admin->setMessage('Unauthorized', 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
$success = false;
|
||||
$method = 'task' . ucfirst($this->task);
|
||||
if (method_exists($this, $method)) {
|
||||
|
||||
Reference in New Issue
Block a user