Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SC 289, small, but non-exploitable hole in backup permissions checkin…

…g. Merged from MOODLE_16_STABLE.
  • Loading branch information...
commit a7c3953d1cb1ca278bea4522c7431166c13bb35b 1 parent acee2e2
tjhunt authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 backup/backup.php
View
18 backup/backup.php
@@ -17,13 +17,7 @@
if (!empty($id)) {
if (!isteacheredit($id)) {
- if (empty($to)) {
- error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
- } else {
- if (!isteacheredit($to)) {
- error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
- }
- }
+ error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
@@ -31,6 +25,12 @@
}
}
+ if (!empty($to)) {
+ if (!isteacheredit($to)) {
+ error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
+ }
+ }
+
//Check site
if (!$site = get_site()) {
error("Site not found!");
@@ -126,7 +126,7 @@
}
print_simple_box_end();
- //Print footer
+ //Print footer
print_footer();
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.