[BUGFIX] Use page uid instead of alias for cHash calculation 68/50468/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:24:17 +0000 (13:24 +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/50468
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index ac30f0b..f9d8650 100644 (file)
@@ -2238,10 +2238,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) {