87670[BUGFIX] Allow site-specific Content-Security-Policy endpoints
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Garvin Hicking +1
- Benni Mack +1
-
Verified V +2 Done
- Oliver Hader +2
- Garvin Hicking +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 12
- typo3/sysext/backend/Classes/Middleware/ContentSecurityPolicyReporter.php+7 −3
- typo3/sysext/core/Classes/Middleware/AbstractContentSecurityPolicyReporter.php+31 −6
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Configuration/DispositionConfiguration.php+23 −1
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Configuration/DispositionMapFactory.php+3 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php+15 −4
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+2 −2
- typo3/sysext/core/Documentation/Changelog/12.4.x/Important-105856-AllowSite-specificContent-Security-PolicyEndpoints.rstnew+61 −0
- typo3/sysext/core/Tests/Functional/Security/ContentSecurityPolicy/PolicyProviderTest.php+36 −0
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/Configuration/DispositionConfigurationTest.php+26 −1
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/Configuration/DispositionMapFactoryTest.php+6 −0
- typo3/sysext/frontend/Classes/Middleware/ContentSecurityPolicyHeaders.php+4 −4
- typo3/sysext/frontend/Classes/Middleware/ContentSecurityPolicyReporter.php+18 −3
Review log 1621
-
Oliver Hader uploaded patch set 1 01/08/25, 14:59
-
Oliver Hader marked it work in progress 01/08/25, 14:59
-
core-ci voted on patch set 1 V -1 01/08/25, 15:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72098
-
Oliver Hader uploaded patch set 2
V -101/08/25, 18:08 -
core-ci voted on patch set 2 V +1 01/08/25, 18:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72110
-
Oliver Hader uploaded patch set 3
V +101/22/25, 15:56 -
Oliver Hader commented on patch set 3 01/22/25, 15:57
This change is ready for review. -
core-ci voted on patch set 3 V +1 01/22/25, 16:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72870
-
Garvin Hicking wrote 01/22/25, 16:08
Topic set to csp -
Oliver Hader uploaded patch set 4
V +101/22/25, 19:24 -
core-ci voted on patch set 4 V +1 01/22/25, 19:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72882
-
Garvin Hicking commented on patch set 4 CR +1 V +1 01/24/25, 19:00
Took a bit longer to review thoroughly because of all the possible mutations (haha) of configuring the CSP. This all seems to work well, thanks for this effort! One minor question: If one sets `reportingUrl: 0` or `reportingingUrl: 1` (because people may not recognize `'0'` versus `0` or are used to TypoScript true/false notations) then currently a PHP type error is thrown: ``` TYPO3\CMS\Core\Security\ContentSecurityPolicy\Configuration\DispositionConfiguration::__construct(): Argument #3 ($reportingUrl) must be of type string|bool|null, int given, called in /var/www/html/typo3-core/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Configuration/DispositionMapFactory.php on line 109 ``` I wonder if we should additionall allow "|int" here, but cast it to a string..? For '0' this would result in the wanted behavior, for '1' this would lead to a reporting-url of '/1'. The latter would hint people at probably doing stuff wrong, and at least it wouldn't break the frontend rendering. What do you think? -
Benni Mack commented on patch set 4 01/24/25, 19:45
Reply
i agree -
Oliver Hader uploaded patch set 5
CR +1V +102/03/25, 13:39 -
Oliver Hader commented on patch set 5 02/03/25, 13:41
Reply
Good point, thanks! I've adjusted it in the code 👍 -
core-ci voted on patch set 5 V +1 02/03/25, 13:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73407
-
Garvin Hicking commented on patch set 5 CR +1 V +1 02/03/25, 14:30
Seems to do the trick, and thanks for going the extra mile here -
Benni Mack voted on patch set 5 CR +1 V +1 02/05/25, 10:21
-
Oliver Hader voted on patch set 5 CR +2 V +2 02/05/25, 13:21
-
Oliver Hader merged patch set 6 02/05/25, 13:23
-
Lina Wolf commented on patch set 6 02/13/25, 07:12
Please review the according documentation: https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/5334