Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

admin/register.php is now using sesskey.

Solved a minor bug with the use of one incorrect string.
  • Loading branch information...
commit 37a192becaee13ad594ca85c149ce23ab0730014 1 parent 13a2015
stronk7 authored
Showing with 7 additions and 2 deletions.
  1. +2 −1  admin/index.php
  2. +5 −1 admin/register.php
View
3  admin/index.php
@@ -354,7 +354,8 @@
echo "</td>";
echo "<td align=center width=33%>";
- print_single_button("register.php", NULL, get_string("registration"));
+ $options['sesskey'] = $USER->sesskey;
+ print_single_button("register.php", $options, get_string("registration"));
echo "</td>";
echo "<tr></table>";
View
6 admin/register.php
@@ -13,6 +13,10 @@
redirect("index.php");
}
+ if (!confirm_sesskey()) {
+ error(get_string('confirmsesskeybad', 'error'));
+ }
+
if (!$admin = get_admin()) {
error("No admins");
}
@@ -35,7 +39,7 @@
print_header("$site->shortname: $strregistration", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
- print_heading($strmanagemodules);
+ print_heading($strregistration);
print_simple_box($strregistrationinfo, "center", "70%");
echo "<br />";
Please sign in to comment.
Something went wrong with that request. Please try again.