Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
67656[FEATURE] Add CSRF protection for frontend forms (ext:form)
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 11
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/56/67656/11 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/56/67656/11 && git cherry-pick FETCH_HEAD
Review
-
Code review CR -1 Needs a vote
- waldhacker -1
-
Verified V -1 Blocked
- core-ci -1 CI
Relation chain 3
-
67656 [FEATURE] Add CSRF protection for frontend forms (ext:form) This change
-
main
67642[BUGFIX] Proper honeypot validation if no session data exists
The chain has patch set 32 of 38, the changes above it need a rebase.
-
main
70460[BUGFIX] Ensure uncached forms in case of POST requests
The chain has patch set 21 of 56, the changes above it need a rebase.
Issues 1
Files 31
- typo3/sysext/core/Documentation/Changelog/master/Feature-93452-AddFrontendCsrfProtection.rstnew+51 −0
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/AntiCsrfHandler.phpnew+164 −0
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/FrontendFormProtection.php1new+97 −0
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php+79 −2
- typo3/sysext/form/Classes/Middleware/AntiCsrfRegistry.php2new+74 −0
- typo3/sysext/form/Classes/Service/TranslationService.php+2 −2
- typo3/sysext/form/Classes/ViewHelpers/FormViewHelper.php+9 −0
- typo3/sysext/form/Configuration/Yaml/FormElements/Form.yaml+2 −0
- typo3/sysext/form/Configuration/RequestMiddlewares.php+10 −0
- typo3/sysext/form/Documentation/I/Config/configuration/Index.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/csrf/enable.rstnew+96 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/honeypot/enable.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/honeypot/formElementToUse.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/translation/translationFiles.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/additionalParams.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/addQueryString.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/argumentsToBeExcludedFromQueryString.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/httpEnctype.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/httpMethod.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/layoutRootPaths.rst+2 −0
Show 11 more files
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/partialRootPaths.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/skipUnknownElements.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/submitButtonLabel.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/templateRootPaths.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/_isCompositeFormElement.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form/renderingOptions/_isTopLevelFormElement.rst+2 −0
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formElementTypes/Form.rst+3 −0
- typo3/sysext/form/Documentation/I/FAQ/Index.rst+10 −0
- typo3/sysext/form/Documentation/Introduction/Index.rst+1 −1
- typo3/sysext/form/Resources/Private/Frontend/Templates/Form.html+11 −0
- typo3/sysext/form/Resources/Private/Language/locallang.xlf+3 −0
Review log 2336
Show 611 earlier messages
-
Ralf Zimmermann uploaded patch set 1 02/06/21, 11:21
-
TYPO3com voted on patch set 1 V -1 02/06/21, 11:22 Completed build in 21s on Sat, 6 Feb, 11:22 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9323
-
Ralf Zimmermann commented on patch set 2 02/06/21, 15:28
Published edit on patch set 1. -
TYPO3com voted on patch set 2 V -1 02/06/21, 15:28 Completed build in 21s on Sat, 6 Feb, 03:28 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9324
-
core-ci voted on patch set 1 V +1 02/06/21, 18:44 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/439
-
core-ci voted on patch set 2 V +1 02/06/21, 18:49 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/440
-
Oliver Hader updated the commit message in patch set 3 04/21/21, 16:06
-
TYPO3com voted on patch set 3 V -1 04/21/21, 16:06 Completed build in 16s on Wed, 21 Apr, 04:06 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10785
-
waldhacker uploaded patch set 4 08/11/21, 13:44
-
waldhacker uploaded patch set 5 08/11/21, 13:48
-
waldhacker uploaded patch set 6 08/11/21, 13:52
-
core-ci voted on patch set 4 V -1 08/11/21, 14:04 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14594
-
core-ci voted on patch set 5 V -1 08/11/21, 14:08 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14595
-
core-ci voted on patch set 6 V -1 08/11/21, 14:18 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14596
-
waldhacker voted on patch set 6 CR -1 08/11/21, 16:26
-
waldhacker commented on patch set 6 08/12/21, 00:10
Have to wait until https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460 is fixed. The caching determination can then be removed here. -
waldhacker uploaded patch set 7 08/12/21, 15:13
-
waldhacker voted on patch set 7 CR -1 08/12/21, 15:22
-
core-ci voted on patch set 7 V -1 08/12/21, 15:45 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14777
-
waldhacker uploaded patch set 8 08/13/21, 18:07
-
waldhacker voted on patch set 8 CR -1 08/13/21, 18:30
-
core-ci voted on patch set 8 V -1 08/13/21, 18:37 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15015
-
waldhacker uploaded patch set 9 08/14/21, 15:57
-
waldhacker uploaded patch set 10 08/14/21, 15:58
-
core-ci voted on patch set 10 V -1 08/14/21, 16:30 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15094
-
core-ci voted on patch set 9 V -1 08/14/21, 16:38 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15093
-
Benjamin Franzke commented on patch set 10 CR -1 08/30/21, 08:21
AntiCsrfRegistry.php:53Hm. IMO we shouldn't (unconditionally!) post-process *every* response in a middleware. Isn't there another way to achieve this? Can we put a header into the cache that can be parsed here? If we'd really really need to to this in a middleware, we should at least check the content-type to avoid parsing file-downloads (that may use a lazy-loaded-stream) or apis. So at least restrict to html content-type? -
waldhacker commented on patch set 10 CR -1 08/30/21, 08:29
AntiCsrfRegistry.php:53Reply Unresolvedon it -
Benni Mack wrote 11/29/21, 10:10
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 11 11/29/21, 13:25
-
core-ci voted on patch set 11 V -1 11/29/21, 15:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20022
-
waldhacker marked it work in progress 02/23/22, 08:18
-
waldhacker commented on patch set 11 CR -1 04/28/22, 07:10
This change is ready for review. -
Simon Schaufelberger commented on patch set 11 04/30/22, 01:38
FrontendFormProtection.php:32Unresolvedsince we use php8 only, you can remove the annotation and use the native type -
waldhacker marked it work in progress 04/30/22, 09:40
-
Benni Mack wrote 03/28/25, 09:47
Topic set to form