From 4d15cf210334b7c96a2c391792b237388bc9358e Mon Sep 17 00:00:00 2001 From: Andreas Fernandez <a.fernandez@scripting-base.de> Date: Mon, 18 May 2020 11:25:25 +0200 Subject: [PATCH] [BUGFIX] Use checksum of frontend groups in cache identifier The generated cache identifier may get very long in case a page has many frontend groups configured and may exceeds the limit of the caching frontend (which is 250 characthers per definition in FrontendInterface::PATTERN_ENTRYIDENTIFIER). To bypass this issue, the group list is hashed now. Resolves: #91413 Related: #91208 Releases: master, 9.5 Change-Id: Id44ae862eb5d45afbd49dc3f833c101c6acb5f5b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64512 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Frank W Blank <blank@wiro-consultants.com> Tested-by: Benjamin Franzke <bfr@qbus.de> Reviewed-by: Oliver Hader <oliver.hader@typo3.org> Reviewed-by: Benjamin Franzke <bfr@qbus.de> --- typo3/sysext/core/Classes/Domain/Repository/PageRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php b/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php index b50f20698880..74ce565e590a 100644 --- a/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php +++ b/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php @@ -1398,7 +1398,7 @@ class PageRepository implements LoggerAwareInterface $userAspect = $this->context->getAspect('frontend.user'); $memberGroups = $userAspect->getGroupIds(); $cache = $this->getRuntimeCache(); - $cacheIdentifier = 'PageRepository_groupAccessWhere_' . str_replace('.', '_', $field) . '_' . $table . '_' . implode('_', $memberGroups); + $cacheIdentifier = 'PageRepository_groupAccessWhere_' . md5($field . '_' . $table . '_' . implode('_', $memberGroups)); $cacheEntry = $cache->get($cacheIdentifier); if ($cacheEntry) { return $cacheEntry; -- GitLab