Merge pull request #7186 from dhensby/pulls/3.5/cache-prefix

FIX Add unique prefix to cache stores to prevent cache leak
This commit is contained in:
Damian Mooyman 2017-07-19 11:54:49 +12:00 committed by GitHub
commit d053c9aaac
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_',
));
}