MDL-73402 block_admin_bookmarks: slightly relax section cleaning.
Allow '/' character in external page names.
This commit is contained in:
@@ -30,7 +30,8 @@ $context = context_system::instance();
|
||||
$PAGE->set_context($context);
|
||||
$adminroot = admin_get_root(false, false); // settings not required - only pages
|
||||
|
||||
if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey()) {
|
||||
// We clean section with safe path here for compatibility with external pages that include a slash in their name.
|
||||
if ($section = optional_param('section', '', PARAM_SAFEPATH) and confirm_sesskey()) {
|
||||
|
||||
if (get_user_preferences('admin_bookmarks')) {
|
||||
$bookmarks = explode(',', get_user_preferences('admin_bookmarks'));
|
||||
|
||||
Reference in New Issue
Block a user