[BUGFIX] Do not save failed token messages in session 79/27879/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Wed, 26 Feb 2014 19:20:07 +0000 (20:20 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 26 Feb 2014 20:25:37 +0000 (21:25 +0100)
commite99e12a972b50f558d933c154e00f8dd0fd6673b
tree50d243de4fe29e6a3183f84806873d0bea570506
parentf2208e545d4ae5b25b90cf800353dce8573fc94a
[BUGFIX] Do not save failed token messages in session

In #30272 the backend formprotection has been changed
to not save flash messages in the user session if
the current request is an Ajax request.

Unfortunately the check for that is broken
since the TYPO3_AJAX global is reset in the
bootstrap now.

Introduce a method which uses the request type
constants and adapt the tests accordingly.

Resolves: #56357
Releases: 6.2
Change-Id: Idae8be036b3747ea71509cc37008a4d694390627
Reviewed-on: https://review.typo3.org/27879
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Classes/FormProtection/BackendFormProtection.php
typo3/sysext/core/Classes/Messaging/FlashMessage.php
typo3/sysext/core/Tests/Unit/FormProtection/BackendFormProtectionTest.php