From 76e697a9d750d568d0d12c10dd8173f656e8bb1e Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Fri, 10 Aug 2018 23:44:34 +1200 Subject: [PATCH] Issue #316: Ensure Container caches have safe prefixes --- CRM/Utils/Cache.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Utils/Cache.php b/CRM/Utils/Cache.php index 358f260181e9..af2bb835753b 100644 --- a/CRM/Utils/Cache.php +++ b/CRM/Utils/Cache.php @@ -169,6 +169,10 @@ public static function getCacheSettings($cachePlugin) { public static function create($params = array()) { $types = (array) $params['type']; + if (!empty($params['name'])) { + $params['name'] = CRM_Core_BAO_Cache::cleanKey($params['name']); + } + foreach ($types as $type) { switch ($type) { case '*memory*':