Bug #38135

Apc Cache backend has side effects

Added by Daniel Poetzinger over 7 years ago. Updated over 1 year ago.

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

100%

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


Related issues

Related to TYPO3.Flow - Bug #44471: Apc Cache backend has side effects Resolved 2013-01-11

Associated revisions

Revision b09bc75e (diff)
Added by Daniel Poetzinger about 7 years ago

[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

Revision ff815944 (diff)
Added by Daniel Poetzinger about 7 years ago

[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

Revision 86c97eeb (diff)
Added by Daniel Poetzinger about 7 years ago

[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

Revision db6aad0c (diff)
Added by Daniel Poetzinger about 7 years ago

[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

Revision 306b134c (diff)
Added by Daniel Poetzinger about 7 years ago

[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

#1 Updated by Gerrit Code Review over 7 years 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

#2 Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#3 Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#4 Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#5 Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#6 Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#7 Updated by Gerrit Code Review about 7 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#8 Updated by Gerrit Code Review about 7 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12145

#9 Updated by Ernesto Baschny about 7 years 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.

#10 Updated by Tymoteusz Motylewski about 7 years ago

I've added an issue on flow bug tracker
http://forge.typo3.org/issues/44471

#11 Updated by Gerrit Code Review about 7 years 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

#12 Updated by Gerrit Code Review about 7 years 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

#13 Updated by Gerrit Code Review about 7 years 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

#14 Updated by Daniel Poetzinger about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100

#15 Updated by Gerrit Code Review about 7 years 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

#16 Updated by Gerrit Code Review about 7 years 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

#17 Updated by Gerrit Code Review about 7 years 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

#18 Updated by Daniel Poetzinger about 7 years ago

  • Status changed from Under Review to Resolved

#19 Updated by Gerrit Code Review about 7 years 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

#20 Updated by Daniel Poetzinger about 7 years ago

  • Status changed from Under Review to Resolved

#21 Updated by Andreas Fernandez almost 2 years ago

  • Related to Bug #83470: Translations can be dragged to default column (in page module -> language) added

#22 Updated by Andreas Fernandez almost 2 years ago

  • Related to deleted (Bug #83470: Translations can be dragged to default column (in page module -> language))

#23 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF