Bug #38135
Apc Cache backend has side effects
| Status: | Resolved | Start date: | 2012-06-17 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 6.0 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 0 |
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;
}
Related issues
| related to TYPO3.Flow - Bug #44471: Apc Cache backend has side effects | Resolved | 2013-01-11 |
Associated revisions
[BUGFIX] Apc Cache backend has side effects
If two caches use the APC cache backend,
one cache can write and get entries from the
other by just using the same key!
So the backend should also use cache id as prefix
Change-Id: I46f7a04386427efb2e1753bef6dfa588508d076c
Fixes: #38135
Releases: 4.5,4.6,4.7,6.0
Reviewed-on: https://review.typo3.org/12145
Reviewed-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Apc Cache backend has side effects
If two caches use the APC cache backend,
one cache can write and get entries from the
other by just using the same key!
So the backend should also use cache id as prefix
Change-Id: I46f7a04386427efb2e1753bef6dfa588508d076c
Fixes: #38135
Releases: 4.5,4.6,4.7,6.0
Reviewed-on: https://review.typo3.org/17470
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Apc Cache backend has side effects
If two caches use the APC cache backend,
one cache can write and get entries from the
other by just using the same key!
So the backend should also use cache id as prefix
Change-Id: I46f7a04386427efb2e1753bef6dfa588508d076c
Fixes: #38135
Releases: 4.5,4.6,4.7,6.0
Reviewed-on: https://review.typo3.org/17472
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Apc Cache backend has side effects
If two caches use the APC cache backend,
one cache can write and get entries from the
other by just using the same key!
So the backend should also use cache id as prefix
Change-Id: I46f7a04386427efb2e1753bef6dfa588508d076c
Fixes: #38135
Releases: 4.5,4.6,4.7,6.0
Reviewed-on: https://review.typo3.org/17471
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Apc Cache backend has side effects
If two caches use the APC cache backend,
one cache can write and get entries from the
other by just using the same key!
So the backend should also use cache id as prefix
Change-Id: I46f7a04386427efb2e1753bef6dfa588508d076c
Fixes: #38135
Releases: 4.5,4.6,4.7,6.0
Reviewed-on: https://review.typo3.org/17473
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
History
Updated by Gerrit Code Review 11 months ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 10 months ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 10 months ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 10 months ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 10 months ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 10 months ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 6 months ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Gerrit Code Review 6 months ago
Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145
Updated by Ernesto Baschny 6 months ago
Please note that this class is a direct backport from the TYPO3 Flow Cache class. So consider reporting the issue there also and pointing here, so that a potentially approved fix can be forward ported.
Updated by Tymoteusz Motylewski 4 months ago
I've added an issue on flow bug tracker
http://forge.typo3.org/issues/44471
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17470
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/17471
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at https://review.typo3.org/17472
Updated by Daniel Poetzinger 4 months ago
- Status changed from Under Review to Resolved
- % Done changed from 90 to 100
Applied in changeset ff81594406ea73c0163b35b5c99b9c0ce202c393.
Updated by Gerrit Code Review 4 months ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/17473
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/17473
Updated by Gerrit Code Review 4 months ago
Patch set 3 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/17473
Updated by Daniel Poetzinger 4 months ago
- Status changed from Under Review to Resolved
Applied in changeset 86c97eebfe14f8ca5291d3f0899f84b4e80b93a0.
Updated by Gerrit Code Review 4 months ago
- Status changed from Resolved to Under Review
Patch set 4 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/17473
Updated by Daniel Poetzinger 4 months ago
- Status changed from Under Review to Resolved
Applied in changeset 306b134c0eb2d2287924515ef1652bbdf8a52aae.