From b77274c1a3c3ab8cfa0abf939aa2e4735e534171 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 18 Jul 2017 16:51:03 +0100 Subject: [PATCH] FIX Add unique prefix to cache stores to prevent cache leak --- cache/Cache.php | 4 +++- core/manifest/ConfigManifest.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cache/Cache.php b/cache/Cache.php index cf0e94bc3..0c63926e4 100644 --- a/cache/Cache.php +++ b/cache/Cache.php @@ -174,7 +174,9 @@ class SS_Cache { $backend = self::$backends[$backend_name]; - $basicOptions = array('cache_id_prefix' => $for); + $basicOptions = array( + 'cache_id_prefix' => $for . '_' . md5(BASE_PATH) . '_', + ); if ($cache_lifetime >= 0) { $basicOptions['lifetime'] = $cache_lifetime; diff --git a/core/manifest/ConfigManifest.php b/core/manifest/ConfigManifest.php index e9091bf6f..8944cd386 100644 --- a/core/manifest/ConfigManifest.php +++ b/core/manifest/ConfigManifest.php @@ -115,7 +115,8 @@ class SS_ConfigManifest { { return SS_Cache::factory('SS_Configuration', 'Core', array( 'automatic_serialization' => true, - 'lifetime' => null + 'lifetime' => null, + 'cache_id_prefix' => 'SS_Configuration_', )); }