blocks: MDL-20711 prevent XSRF.

Uses new require_sesskey function from MDL-20702.
This commit is contained in:
Tim Hunt
2009-11-02 17:16:28 +00:00
parent 81d1f0914d
commit c74eec3bee
+5 -5
View File
@@ -959,7 +959,7 @@ class block_manager {
return false;
}
confirm_sesskey();
require_sesskey();
if (!$this->page->user_can_edit_blocks()) {
throw new moodle_exception('nopermissions', '', $this->page->url->out(), get_string('addblock'));
@@ -987,7 +987,7 @@ class block_manager {
return false;
}
confirm_sesskey();
require_sesskey();
$block = $this->page->blocks->find_instance($blockid);
@@ -1016,7 +1016,7 @@ class block_manager {
return false;
}
confirm_sesskey();
require_sesskey();
$block = $this->page->blocks->find_instance($blockid);
@@ -1046,7 +1046,7 @@ class block_manager {
return false;
}
confirm_sesskey();
require_sesskey();
require_once($CFG->dirroot . '/blocks/edit_form.php');
$block = $this->find_instance($blockid);
@@ -1169,7 +1169,7 @@ class block_manager {
return false;
}
confirm_sesskey();
require_sesskey();
$block = $this->find_instance($blockid);