[BUGFIX] Incorrect cHash generation may cause 404 on any page 70/50070/2
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 28 Sep 2016 14:46:23 +0000 (17:46 +0300)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 30 Sep 2016 07:37:38 +0000 (09:37 +0200)
commit3896be706cf037f15a786225a13d385f7540ea4a
treec7d5b2b9e34ab030ff57d6de6a88b213115c00ed
parent63be404125461a571b17e7df20dd99b7c3c768e0
[BUGFIX] Incorrect cHash generation may cause 404 on any page

If an empty parameter appears in the query string passed to
CacheHashCalculator::getRelevantParameters(), the code will
calculate cHash even if there are no other parameters. But
upon going to the generated link, there will be a 404 error
due to failed cHash check. Parameters with trimmed empty
names do not appear in $_GET in PHP and cHash cannot be
validated. The code should ignore the parameter with
trimmed empty name.

Resolves: #78102
Releases: master, 6.2, 7.6
Change-Id: I3c43d62ae9c31bd41674db62090b6b4a520f8b68
Reviewed-on: https://review.typo3.org/50070
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php
typo3/sysext/frontend/Tests/Unit/Page/CacheHashCalculatorTest.php