Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-43146 enrol_imsenterprise: missing sesskey protection

  • Loading branch information...
commit ea8647b39ec9cf1d73e04b05559bd12d97aa5229 1 parent a71a6de
@danpoltawski danpoltawski authored damyon committed
View
1  enrol/imsenterprise/importnow.php
@@ -2,6 +2,7 @@
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_login(0, false);
require_capability('moodle/site:config', context_system::instance());
+require_sesskey();
$site = get_site();
View
4 enrol/imsenterprise/settings.php
@@ -94,6 +94,8 @@
$settings->add(new admin_setting_configcheckbox('enrol_imsenterprise/imscapitafix', get_string('usecapitafix', 'enrol_imsenterprise'), get_string('usecapitafix_desc', 'enrol_imsenterprise'), 0));
- $importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' <a href="../enrol/imsenterprise/importnow.php">'.get_string('doitnow', 'enrol_imsenterprise').'</a>';
+ $importurl = new moodle_url('/enrol/imsenterprise/importnow.php', array('sesskey' => sesskey()));
+ $importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' '.
+ html_writer::link($importurl, get_string('doitnow', 'enrol_imsenterprise'));
$settings->add(new admin_setting_heading('enrol_imsenterprise_doitnowmessage', '', $importnowstring));
}
Please sign in to comment.
Something went wrong with that request. Please try again.