Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

course/unenrol.php is using sesskey.

  • Loading branch information...
commit 18240770525dbe453423c5d0e5f18b04b816d385 1 parent 672610e
stronk7 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 course/unenrol.php
4 course/unenrol.php
View
@@ -28,7 +28,7 @@
error("You are not allowed to unenroll");
}
- if (isset($confirm)) {
+ if (isset($confirm) and confirm_sesskey()) {
if (! unenrol_student($user->id, $course->id)) {
error("An error occurred while trying to unenrol you.");
@@ -56,7 +56,7 @@
$strunenrolsure = get_string("unenrolsure", "", fullname($user, true));
}
- notice_yesno ($strunenrolsure, "unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
+ notice_yesno ($strunenrolsure, "unenrol.php?id=$id&user=$user->id&confirm=yes&sesskey=$USER->sesskey", "$HTTP_REFERER");
print_footer();
Please sign in to comment.
Something went wrong with that request. Please try again.