[BUGFIX] Use page uid instead of alias for cHash calculation 74/50574/2
authorHelmut Hummel <info@helhum.io>
Mon, 31 Oct 2016 23:14:45 +0000 (00:14 +0100)
committerHelmut Hummel <typo3@helhum.io>
Thu, 10 Nov 2016 12:25:12 +0000 (13:25 +0100)
To make cHash calculation work again, we need to use the page uid.
However the GET argument might contain a page alias and not the id.
Use the calculated id instead to avoid wrong cHash calculation.

Resolves: #78526
Releases: master, 7.6, 6.2
Change-Id: Iaa89b7a52a581bd5ac7c0b01049a7f9596258051
Reviewed-on: https://review.typo3.org/50574
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 52d00be..61cb01b 100644 (file)
@@ -2278,10 +2278,8 @@ class TypoScriptFrontendController
         }
         $GET = GeneralUtility::_GET();
         if ($this->cHash && is_array($GET)) {
-            if (!isset($GET['id'])) {
-                // id not in $_GET -> home page -> use already determined id
-                $GET['id'] = $this->id;
-            }
+            // Make sure we use the page uid and not the page alias
+            $GET['id'] = $this->id;
             $this->cHash_array = $this->cacheHash->getRelevantParameters(GeneralUtility::implodeArrayForUrl('', $GET));
             $cHash_calc = $this->cacheHash->calculateCacheHash($this->cHash_array);
             if ($cHash_calc != $this->cHash) {