MDL-15450 CSRF prevention; merged from MOODLE_16_STABLE

This commit is contained in:
skodak
2008-07-08 13:05:09 +00:00
parent 95416b9889
commit 2d60f585aa
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -411,4 +411,5 @@ if (has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM, SI
</table>
<input type="hidden" name="course" value="<?php p($course->id) ?>" />
<input type="hidden" name="id" value="<?php p($user->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
</form>
+1 -1
View File
@@ -71,7 +71,7 @@
/// If data submitted, then process and store.
if ($usernew = data_submitted()) {
if ($usernew = data_submitted() and confirm_sesskey()) {
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
// if userid = x and name = changeme then we are adding 1