MDL-15450 CSRF prevention

This commit is contained in:
skodak
2008-07-08 13:03:59 +00:00
parent 04ea70175b
commit 726d8b5805
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -396,4 +396,5 @@ if (isadmin()) {
</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
@@ -69,7 +69,7 @@
/// If data submitted, then process and store.
if ($usernew = data_submitted()) {
if ($usernew = data_submitted() and confirm_sesskey()) {
if (($USER->id <> $usernew->id) && !isadmin()) {
print_error('onlyeditown');