Project

General

Profile

Actions

Bug #38135

closed

Apc Cache backend has side effects

Added by Daniel Poetzinger over 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-06-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If two caches use the APC cache backend, one cache can write and get entries from the other by just using the same key!

Patch:

--- a/t3lib/cache/backend/class.t3lib_cache_backend_apcbackend.php
+++ b/t3lib/cache/backend/class.t3lib_cache_backend_apcbackend.php
@@ -87,7 +87,7 @@ class t3lib_cache_backend_ApcBackend extends t3lib_cache_backend_AbstractBackend
        public function setCache(t3lib_cache_frontend_Frontend $cache) {
                parent::setCache($cache);
                $processUser = extension_loaded('posix') ? posix_getpwuid(posix_geteuid()) : array('name' => 'default');
-               $pathHash = t3lib_div::shortMD5(PATH_site . $processUser['name'] . $this->context, 12);
+               $pathHash = t3lib_div::shortMD5(PATH_site . $processUser['name'] . $this->context . $cache->getIdentifier(), 12);
                $this->identifierPrefix = 'TYPO3_' . $pathHash;
        }

Actions

Also available in: Atom PDF