From c6cbc3c70c27f910e77d39ac00b62274a095026b Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 30 Jan 2013 10:28:34 +1300 Subject: [PATCH] MDL-37474 cache: fixed bug with definition cleaning --- cache/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache/admin.php b/cache/admin.php index 56592ee74a6..1537b959d87 100644 --- a/cache/admin.php +++ b/cache/admin.php @@ -129,7 +129,7 @@ if (!empty($action) && confirm_sesskey()) { } break; case 'editdefinitionmapping' : // Edit definition mappings. - $definition = required_param('definition', PARAM_ALPHANUMEXT); + $definition = required_param('definition', PARAM_SAFEPATH); $title = get_string('editdefinitionmappings', 'cache', $definition); $mform = new cache_definition_mappings_form($PAGE->url, array('definition' => $definition)); if ($mform->is_cancelled()) { @@ -168,7 +168,7 @@ if (!empty($action) && confirm_sesskey()) { break; case 'purgedefinition': // Purge a specific definition. - $definition = required_param('definition', PARAM_ALPHANUMEXT); + $definition = required_param('definition', PARAM_SAFEPATH); list($component, $area) = explode('/', $definition, 2); cache_helper::purge_by_definition($component, $area); redirect($PAGE->url, get_string('purgedefinitionsuccess', 'cache'), 5); -- 2.43.0