[BUGFIX] Fluid: form.hidden ViewHelper needs to respect submitted data 29/44529/4
authorAndreas Allacher <andreas@allacher.com>
Wed, 4 Nov 2015 06:56:11 +0000 (07:56 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 10 Nov 2015 12:22:25 +0000 (13:22 +0100)
As hidden fields might be modified via e.g. JavaScript
they also have to respect submitted data upon submit.

Change-Id: I3c0520e98bf49e80009cb6d42f9356b37bc42032
Resolves: #71301
Releases: master
Reviewed-on: https://review.typo3.org/44529
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Sebastian Fischer <typo3@evoweb.de>
Tested-by: Sebastian Fischer <typo3@evoweb.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php

index 985bb56..2754bfd 100644 (file)
@@ -57,6 +57,7 @@ class HiddenViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie
     {
         $name = $this->getName();
         $this->registerFieldNameForFormTokenGeneration($name);
+        $this->setRespectSubmittedDataValue(true);
 
         $this->tag->addAttribute('type', 'hidden');
         $this->tag->addAttribute('name', $name);