mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-06 21:26:58 +02:00
Blocks Plugin: csrf vulnerability resolved
This commit is contained in:
12
plugins/box/blocks/blocks.admin.php
Normal file → Executable file
12
plugins/box/blocks/blocks.admin.php
Normal file → Executable file
@@ -117,9 +117,15 @@
|
||||
->display();
|
||||
break;
|
||||
case "delete_block":
|
||||
File::delete($blocks_path.Request::get('filename').'.block.html');
|
||||
Notification::set('success', __('Block <i>:name</i> deleted', 'blocks', array(':name' => File::name(Request::get('filename')))));
|
||||
Request::redirect('index.php?id=blocks');
|
||||
|
||||
if (Security::check(Request::get('token'))) {
|
||||
|
||||
File::delete($blocks_path.Request::get('filename').'.block.html');
|
||||
Notification::set('success', __('Block <i>:name</i> deleted', 'blocks', array(':name' => File::name(Request::get('filename')))));
|
||||
Request::redirect('index.php?id=blocks');
|
||||
|
||||
} else { die('csrf detected!'); }
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user