92739[BUGFIX] Allow nonce usage in CSP for style-src-elem
Commit message
Review
-
Code review CR 0
-
Verified V 0
- core-ci +1 CI
Issues 1
Files 3
Review log 710
-
Torben Hansen uploaded patch set 1 02/07/26, 14:18
-
core-ci voted on patch set 1 V -1 02/07/26, 14:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95382
-
Torben Hansen uploaded patch set 2
V -102/07/26, 18:00 -
core-ci voted on patch set 2 V +1 02/07/26, 18:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95384
-
Torben Hansen uploaded patch set 3
V +102/07/26, 18:15 -
core-ci voted on patch set 3 V +1 02/07/26, 18:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95385
-
Oliver Hader commented on patch set 3 02/09/26, 19:19
I'd opt for avoiding to change to global CSP configuration for the frontend. Instead, I would * inject `\TYPO3\CMS\Core\Security\ContentSecurityPolicy\PolicyRegistry $policyRegistry` to the `ErrorPageController` constructor * dynamically apply the mutation there, e.g. ``` $this->policyRegistry->appendMutationCollection( new MutationCollection( new Mutation( MutationMode::Extend, Directive::StyleSrcElem, SourceKeyword::nonceProxy ) ) ); ``` -
Oliver Hader commented on patch set 3 02/09/26, 19:21
Reply Unresolved
However, I was was not able to find CSP headers when the `ErrorPageController` was used on accessing a non-existing page in the frontend. The `PageResolver` middleware is executed before the `ContentSecurityPolicyHeaders` middleware. -
Oliver Hader commented on patch set 3 02/09/26, 23:08
Unresolved
I've created an alternative approach, that provides a generic approach for applying CSP to the `ErrorController`, not just for the underlying `ErrorPageController`. → https://review.typo3.org/c/Packages/TYPO3.CMS/+/92760 -
Torben Hansen abandoned the change 02/10/26, 09:54
Going this approach https://review.typo3.org/c/Packages/TYPO3.CMS/+/92760