[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
Showing
- typo3/sysext/core/Classes/FormProtection/BackendFormProtection.php 10 additions, 1 deletion...ext/core/Classes/FormProtection/BackendFormProtection.php
- typo3/sysext/core/Classes/Messaging/FlashMessage.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Messaging/FlashMessage.php
- typo3/sysext/core/Tests/Unit/FormProtection/BackendFormProtectionTest.php 2 additions, 2 deletions...e/Tests/Unit/FormProtection/BackendFormProtectionTest.php
Please register or sign in to comment