admin/auth.php is now using sesskey.

Merged from MOODLE_14_STABLE
This commit is contained in:
stronk7
2004-10-02 19:50:16 +00:00
parent ad97e350fc
commit df0d5501d9
3 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -12,6 +12,9 @@
error("Only the admin can use this page");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
/// If data submitted, then process and store.
@@ -27,7 +30,7 @@
notify("Problem saving config $name as $value");
}
}
redirect("auth.php", get_string("changessaved"), 1);
redirect("auth.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
exit;
} else {
@@ -94,9 +97,10 @@
echo "<center><p><b>";
echo "<form target=\"{$CFG->framename}\" name=\"authmenu\" method=\"post\" action=\"auth.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
print_string("chooseauthmethod","auth");
choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?sesskey=$USER->sesskey&auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
echo "</b></p></center>";
+1 -1
View File
@@ -310,7 +310,7 @@
$configdata);
$userdata = "<font size=+1>&nbsp;</font><a href=\"auth.php\">".get_string("authentication")."</a> - <font size=\"1\">".
$userdata = "<font size=+1>&nbsp;</font><a href=\"auth.php?sesskey=$USER->sesskey\">".get_string("authentication")."</a> - <font size=\"1\">".
get_string("adminhelpauthentication")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"user.php\">".get_string("edituser")."</a> - <font size=\"1\">".
get_string("adminhelpedituser")."</font><br />";
+1 -1
View File
@@ -22,7 +22,7 @@
$table->align = array ("right", "left");
$table->data[] = array("<b><a href=\"auth.php\">".get_string("authentication")."</a></b>",
$table->data[] = array("<b><a href=\"auth.php?sesskey=$USER->sesskey\">".get_string("authentication")."</a></b>",
get_string("adminhelpauthentication"));
$table->data[] = array("<b><a href=\"user.php\">".get_string("edituser")."</a></b>",