[TYPO3-mvc] Adding extra fields to a form using JS (@dontverifyrequesthash)

Sebastian Fischer sf at marketing-factory.de
Wed Mar 9 09:34:57 CET 2011


On 07.03.2011 13:05, Henrik M. Rasmussen wrote:
> Hello,
>
> I have a newAction with two arguments, an object and an array. In the
> new-form I have used JS to add empty rows to the array. This works fine,
> but I need to set the @dontverifyrequesthash annotation on the new and
> create actions for Extbase to ignore the incorrect request hash.
>
> This doesn't seem like the best solution to me. Is there a better way to
> deal with this problem?
>
> Is the only alternative to submit and reload the form using JS for each
> new added row?
>
> Best regards
>
> Henrik Rasmussen

Hi Henrik,

like you already mentioned it is current the only possible step to 
reload the page on every row added.

Problem for that is, that the hash is generated with every field 
available. If you add fields they need to go into the hash and thats 
only possible by reloading.

But maybe it would be a good solution to use the method vor hash 
generation in an ajax call on an eID controller. But be aware that it 
would open a possible security issue if you dont check which fields are 
going into the hash.

Greetings
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list