FIX Add unique prefix to cache stores to prevent cache leak

This commit is contained in:
Daniel Hensby 2017-07-18 16:51:03 +01:00 committed by Daniel Hensby
parent fa8f0cc955
commit b77274c1a3
No known key found for this signature in database
GPG Key ID: E38EC566FE29EB66
2 changed files with 5 additions and 2 deletions

4
cache/Cache.php vendored
View File

@ -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;

View File

@ -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_',
));
}