]> git.mjollnir.org Git - moodle.git/commitdiff
quiz: MDL-20706 prevent XSRF.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 2 Nov 2009 17:10:31 +0000 (17:10 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 2 Nov 2009 17:10:31 +0000 (17:10 +0000)
Uses new require_sesskey function from MDL-20702.

mod/quiz/processattempt.php
mod/quiz/review.php

index cbabdc5094aed2a38061995233c5fc60d230dccd..fef967d8cf2b0d53913b4d9f2a277c2d8a0c443d 100644 (file)
@@ -44,7 +44,7 @@ if ($timeup) {
 
 /// Check login.
 require_login($attemptobj->get_courseid(), false, $attemptobj->get_cm());
-confirm_sesskey();
+require_sesskey();
 
 /// Check that this attempt belongs to this user.
 if ($attemptobj->get_userid() != $USER->id) {
index 7eb76063ce2aa71642b930b697bf47ebf945a8c9..d744696a5f21953ad08bfc2c52289f18078c3544 100644 (file)
@@ -62,7 +62,7 @@
 
 /// Save the flag states, if they are being changed.
     if ($options->flags == QUESTION_FLAGSEDITABLE && optional_param('savingflags', false, PARAM_BOOL)) {
-        confirm_sesskey();
+        require_sesskey();
         $formdata = data_submitted();
 
         question_save_flags($formdata, $attemptid, $questionids);