[BUGFIX] Incorrect cHash generation may cause 404 on any page 59/50059/3
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:22:41 +0000 (09:22 +0200)
commit88c723128fb1911455f8eed7de9e202c4fab8897
treebb6fadf3f886db2b4a6e6a8f41592fcee0c716b4
parentf8b99f0808f62012aa3d8626cbb46acf3dc4e7c4
[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/50059
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Stephan Gro├čberndt <stephan@grossberndt.de>
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