MDL-18229 gradebook: Sesskey required for all actions.
This commit is contained in:
@@ -189,8 +189,11 @@ abstract class tablelike extends screen {
|
||||
|
||||
$buttons = html_writer::tag('div', $buttonhtml, $buttonattr);
|
||||
|
||||
$sessionvalidation = html_writer::empty_tag('input',
|
||||
array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
|
||||
|
||||
return html_writer::tag('form',
|
||||
$buttons . html_writer::table($table) . $this->bulk_insert() . $buttons,
|
||||
$buttons . html_writer::table($table) . $this->bulk_insert() . $buttons . $sessionvalidation,
|
||||
array('method' => 'POST')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -99,6 +99,7 @@ $pageparams = array(
|
||||
$currentpage = new moodle_url('/grade/report/singleview/index.php', $pageparams);
|
||||
|
||||
if ($data = data_submitted()) {
|
||||
require_sesskey(); // Must have a sesskey for all actions.
|
||||
$warnings = $report->process_data($data);
|
||||
|
||||
if (empty($warnings)) {
|
||||
|
||||
Reference in New Issue
Block a user