[FEATURE] Enforce cHash argument for Extbase actions 76/49976/20
authorHelmut Hummel <info@helhum.io>
Wed, 21 Sep 2016 20:26:16 +0000 (23:26 +0300)
committerSusanne Moog <susanne.moog@typo3.org>
Fri, 2 Dec 2016 13:35:57 +0000 (14:35 +0100)
commit2769e508741b8561f2236411bc81246a4d4d796d
tree295ed3c1d8d46c96b9215fc454cadd7492d927df
parentd16daa6d4f450cc9223100c4cb81d8dc7b4fb9af
[FEATURE] Enforce cHash argument for Extbase actions

TypoScriptFrontendController::reqCHash() is now called for Extbase
frontend plugin actions just like they were usually called for the
legacy AbstractPlugin.

This throws a 404, if plugin arguments are present, but cHash is not,
which would also happen, if the plugin arguments were added
to "cHashRequiredParameters" configuration.

This provides a more reliable page caching behavior
by default and with zero configuration for extension authors.

With the feature switch "requireCHashArgumentForActionArguments" this
behavior can be disabled, which could be useful, if all actions in a plugin
are uncached or one wants to manually control the cHash behavior.

Resolves: #78002
Releases: master
Change-Id: Ic6f71c3e5c8a94a0d422372a08c944aef5663f06
Reviewed-on: https://review.typo3.org/49976
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Breaking-78002-EnforceCHashArgumentForExtbaseActions.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Feature-78002-EnforceCHashArgumentForExtbaseActions.rst [new file with mode: 0644]
typo3/sysext/extbase/Classes/Mvc/Web/CacheHashEnforcer.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/CacheHashEnforcerTest.php [new file with mode: 0644]
typo3/sysext/extbase/ext_typoscript_setup.txt