Permalink
Browse files

MDL-20901 fixed input validationand removed annoying redirect which m…

…ust not be clicked during course import
  • Loading branch information...
1 parent 4a8192d commit 5a500a5a6922f2417cf836321d556dbfa14d8ebf @skodak skodak committed Nov 19, 2009
Showing with 6 additions and 1 deletion.
  1. +2 −0 backup/restore.php
  2. +1 −0 backup/restore_check.html
  3. +3 −1 backup/restorelib.php
View
@@ -144,6 +144,7 @@
if (!empty($SESSION->restore->importing)) {
// set up all the config stuff and skip asking the user about it.
restore_setup_for_check($SESSION->restore,$backup_unique_code);
+ require_sesskey();
include_once("restore_execute.html");
} else {
include_once("restore_form.html");
@@ -159,6 +160,7 @@
}
//Unset this for the future
unset($SESSION->cancontinue);
+ require_sesskey();
include_once("restore_execute.html");
}
print_simple_box_end();
@@ -284,6 +284,7 @@
$hidden["launch"] = "execute";
$hidden["file"] = $file;
$hidden["id"] = $id;
+ $hidden["sesskey"] = sesskey();
print_string('longtimewarning','admin');
if ($restore->users && !empty($info->mnet_externalusers)
@@ -5848,7 +5848,9 @@ function restore_precheck($id,$file,&$errorstr,$noredirect=false) {
}
else {
if (empty($noredirect)) {
- redirect($CFG->wwwroot.'/backup/restore.php?backup_unique_code='.$backup_unique_code.'&launch=form&file='.$file.'&id='.$id);
+ print_continue($CFG->wwwroot.'/backup/restore.php?backup_unique_code='.$backup_unique_code.'&launch=form&file='.$file.'&id='.$id.'&sesskey='.sesskey());
+ print_footer();
+ die;
} else {
return $backup_unique_code;
}

0 comments on commit 5a500a5

Please sign in to comment.