Skip to content

Commit

Permalink
MDL-43146 enrol_imsenterprise: missing sesskey protection
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski authored and Damyon Wiese committed Mar 4, 2014
1 parent ee8f17d commit 41a19bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions enrol/imsenterprise/importnow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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();

Expand Down
5 changes: 3 additions & 2 deletions enrol/imsenterprise/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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">';
$importnowstring .= get_string('doitnow', 'enrol_imsenterprise').'</a>';
$importurl = new moodle_url('/enrol/imsenterprise/importnow.php', array('sesskey' => sesskey()));
$importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' ';
$importnowstring .= html_writer::link($importurl, get_string('doitnow', 'enrol_imsenterprise'));
$settings->add(new admin_setting_heading('enrol_imsenterprise_doitnowmessage', '', $importnowstring));
}

0 comments on commit 41a19bf

Please sign in to comment.