Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
80554[TASK] Prefer CSP hash values over nonce values
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 51
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/54/80554/51 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/54/80554/51 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Relation chain 2
-
main
80664[TASK] Streamline applying stylesheets in lit-element components
The chain has patch set 5 of 17, the changes above it need a rebase.
-
80554 [TASK] Prefer CSP hash values over nonce values This change
Issues 1
Files 53
- typo3/sysext/adminpanel/Classes/Controller/MainController.php+4 −5
- typo3/sysext/adminpanel/Classes/Service/ResourceService.phpnew+149 −0
- typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php+7 −66
- typo3/sysext/backend/Classes/Controller/BackendController.php+0 −2
- typo3/sysext/backend/Classes/Middleware/ContentSecurityPolicyHeaders.php1+13 −4
- typo3/sysext/backend/Classes/Template/PageRendererBackendSetupTrait.php+1 −4
- typo3/sysext/backend/Configuration/ContentSecurityPolicies.php+13 −2
- typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php+24 −8
- typo3/sysext/core/Classes/Http/Security/ReferrerEnforcer.php+23 −7
- typo3/sysext/core/Classes/Page/AssetRenderer.php1+60 −13
- typo3/sysext/core/Classes/Page/ImportMap.php+4 −9
- typo3/sysext/core/Classes/Page/ImportMapFactory.php+3 −0
- typo3/sysext/core/Classes/Page/JavaScriptRenderer.php+4 −3
- typo3/sysext/core/Classes/Page/PageRenderer.php1+97 −32
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Configuration/Behavior.phpnew+83 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Configuration/DispositionConfiguration.php+2 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Configuration/UseType.phpnew+45 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/Report.php+6 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Directive.php+35 −1
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/HashCollection.phpnew+228 −0
Show 33 more files
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/HashProxy.php+36 −4
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/HashValue.php+12 −1
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Policy.php+5 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php+104 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyRegistry.php+3 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/RequestAttributeResolver.phpnew+64 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/SourceKeyword.php+39 −9
- typo3/sysext/core/Classes/ServiceProvider.php+9 −6
- typo3/sysext/core/Configuration/DefaultConfiguration.php+14 −0
- typo3/sysext/core/Tests/Functional/Page/PageRendererTest.php+2 −0
- typo3/sysext/core/Tests/Functional/Security/ContentSecurityPolicy/PolicyTest.php+18 −1
- typo3/sysext/core/Tests/Functional/SiteHandling/SiteBasedTestTrait.php+9 −0
- typo3/sysext/core/Tests/Unit/Http/Security/ReferrerEnforcerTest.php+36 −5
- typo3/sysext/core/Tests/Unit/Page/AssetRendererTest.php+8 −1
- typo3/sysext/core/Tests/Unit/Page/ImportMapTest.php+24 −12
- typo3/sysext/core/Tests/Unit/Page/PageRendererFactoryTrait.php+8 −1
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/Configuration/DispositionConfigurationTest.php+11 −2
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/SourceKeywordTest.phpnew+55 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/CssViewHelper.php+3 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/ScriptViewHelper.php+3 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/StyleAttrViewHelper.phpnew+56 −0
- typo3/sysext/frontend/Classes/Cache/MetaDataState.php+24 −6
- typo3/sysext/frontend/Classes/Cache/NonceValueSubstitution.php1+11 −1
- typo3/sysext/frontend/Classes/Html/HtmlWorker.php+15 −2
- typo3/sysext/frontend/Classes/Http/RequestHandler.php+23 −8
- typo3/sysext/frontend/Classes/Middleware/ContentSecurityPolicyHeaders.php+18 −8
- typo3/sysext/frontend/Tests/Functional/SiteHandling/RequestHandlerTest.php+57 −11
- typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php+27 −48
- typo3/sysext/install/Classes/Controller/ControllerTrait.php+8 −2
- typo3/sysext/install/Classes/Controller/InstallerController.php+4 −2
- typo3/sysext/install/Classes/Controller/LayoutController.php+4 −2
- typo3/sysext/install/Classes/Middleware/Maintenance.php+3 −2
- typo3/sysext/install/Classes/ServiceProvider.php+29 −0
Review log 60109
Show 4484 earlier messages
-
Oliver Hader uploaded patch set 1 08/15/23, 09:47
-
Oliver Hader marked it work in progress 08/15/23, 09:48
-
core-ci voted on patch set 1 V -1 08/15/23, 09:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45501
-
Oliver Hader uploaded patch set 2
V -108/15/23, 10:02 -
core-ci voted on patch set 2 V -1 08/15/23, 10:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45502
-
Oliver Hader uploaded patch set 3
V -108/21/23, 14:42 -
core-ci voted on patch set 3 V -1 08/21/23, 14:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45651
-
Oliver Hader uploaded patch set 4
V -108/22/23, 13:29 -
Oliver Hader uploaded patch set 5 08/22/23, 13:30
-
core-ci voted on patch set 4 V -1 08/22/23, 13:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45685
-
core-ci voted on patch set 5 V -1 08/22/23, 13:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45686
-
Oliver Hader uploaded patch set 6
V -108/22/23, 14:33 -
core-ci voted on patch set 6 V -1 08/22/23, 14:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45690
-
Oliver Hader uploaded patch set 7
V -108/22/23, 16:10 -
core-ci voted on patch set 7 V -1 08/22/23, 16:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45692
-
Oliver Hader uploaded patch set 8
V -108/24/23, 06:59 -
core-ci voted on patch set 8 V -1 08/24/23, 07:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45775
-
Oliver Hader uploaded patch set 9 08/24/23, 07:33
Copied Votes: * Verified-1 (copy condition: "changekind:NO_CHANGE") -
core-ci voted on patch set 9 V -1 08/24/23, 07:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45776
-
Oliver Hader wrote 08/30/23, 15:32
Topic set to csp -
Oliver Hader uploaded patch set 10
V -110/20/23, 13:33 -
core-ci voted on patch set 10 V -1 10/20/23, 13:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47976
-
Oliver Hader uploaded patch set 11
V -110/21/23, 13:45 -
Oliver Hader uploaded patch set 12 10/21/23, 13:52
-
core-ci voted on patch set 11 V -1 10/21/23, 13:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48008
-
core-ci voted on patch set 12 V +1 10/21/23, 13:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48009
-
Oliver Hader uploaded patch set 13
V +110/26/23, 10:39 -
core-ci voted on patch set 13 V +1 10/26/23, 10:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48221
-
Oliver Hader rebased onto patch set 14
V +110/26/23, 15:59 -
Oliver Hader uploaded patch set 15 10/26/23, 16:27
-
core-ci voted on patch set 15 V +1 10/26/23, 16:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48254
-
Oliver Hader uploaded patch set 16
V +110/26/23, 20:00 -
core-ci voted on patch set 16 V +1 10/26/23, 20:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48259
-
Oliver Hader uploaded patch set 17
V +110/26/23, 20:09 -
core-ci voted on patch set 17 V +1 10/26/23, 20:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48260
-
Oliver Hader uploaded patch set 18
V +110/27/23, 08:20 -
core-ci voted on patch set 18 V -1 10/27/23, 08:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48277
-
Oliver Hader uploaded patch set 19
V -110/27/23, 08:45 -
core-ci voted on patch set 19 V +1 10/27/23, 08:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48278
-
Oliver Hader uploaded patch set 20
V +110/31/23, 10:09 -
Oliver Hader uploaded patch set 21 10/31/23, 10:12
-
core-ci voted on patch set 20 V -1 10/31/23, 10:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48391
-
core-ci voted on patch set 21 V -1 10/31/23, 10:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48392
-
Oliver Hader uploaded patch set 22
V -110/31/23, 10:23 -
core-ci voted on patch set 22 V +1 10/31/23, 10:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48393
-
Oliver Hader uploaded patch set 23
V +111/05/23, 12:59 -
core-ci voted on patch set 23 V -1 11/05/23, 13:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48590
-
Oliver Hader uploaded patch set 24
V -111/05/23, 13:13 -
core-ci voted on patch set 24 V -1 11/05/23, 13:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48591
-
Oliver Hader uploaded patch set 25
V -111/05/23, 16:13 -
core-ci voted on patch set 25 V +1 11/05/23, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48593
-
Oliver Hader uploaded patch set 26
V +111/16/23, 14:23 -
core-ci voted on patch set 26 V +1 11/16/23, 14:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49031
-
Oliver Hader uploaded patch set 27
V +112/07/23, 12:18 -
core-ci voted on patch set 27 V +1 12/07/23, 12:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50446
-
Oliver Hader uploaded patch set 28
V +112/07/23, 14:38 -
core-ci voted on patch set 28 V -1 12/07/23, 14:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50458
-
Oliver Hader commented on patch set 28 12/07/23, 14:45
ContentSecurityPolicyHeaders.php:49UnresolvedMaybe use prefix, e.g. `csp.nonce`, `csp.scope`?AssetRenderer.php:116Unresolved`csp`? `useCsp`, `adjustCsp` (similar for `PageRenderer` as well)?PageRenderer.php:1002Unresolved`useNonce` is ugly... `csp`, `useCsp`, `adjustCsp`? -
core-ci voted on patch set 28 V +1 12/07/23, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50458
-
Oliver Hader uploaded patch set 29
V +109/17/24, 09:55v13-adoptions -
core-ci voted on patch set 29 V +1 09/17/24, 10:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65971
-
Benni Mack updated the commit message in patch set 30
V +110/18/24, 13:53 -
Oliver Hader uploaded patch set 31 10/31/24, 11:51
-
core-ci voted on patch set 31 V +1 10/31/24, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68915
-
Oliver Hader uploaded patch set 32
V +110/31/24, 12:04 -
core-ci voted on patch set 32 V -1 10/31/24, 12:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68918
-
Oliver Hader uploaded patch set 33
V -102/28/25, 09:08 -
core-ci voted on patch set 33 V -1 02/28/25, 09:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74877
-
Oliver Hader uploaded patch set 34
V -102/28/25, 18:30 -
core-ci voted on patch set 34 V -1 02/28/25, 18:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74918
-
Oliver Hader uploaded patch set 35
V -103/01/25, 07:51 -
core-ci voted on patch set 35 V -1 03/01/25, 08:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74940
-
Oliver Hader uploaded patch set 36
V -103/04/25, 14:16 -
core-ci voted on patch set 36 V +1 03/04/25, 14:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75105
-
Oliver Hader uploaded patch set 37
V +103/12/25, 00:18 -
core-ci voted on patch set 37 V -1 03/12/25, 00:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75488
-
Oliver Hader uploaded patch set 38
V -103/12/25, 09:21 -
core-ci voted on patch set 38 V -1 03/12/25, 09:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75510
-
Oliver Hader uploaded patch set 39
V -103/12/25, 14:12 -
Oliver Hader uploaded patch set 40 03/12/25, 14:15
-
core-ci voted on patch set 39 V -1 03/12/25, 14:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75514
-
core-ci voted on patch set 40 V -1 03/12/25, 14:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75515
-
Oliver Hader uploaded patch set 41
V -103/12/25, 15:24 -
core-ci voted on patch set 41 V -1 03/12/25, 15:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75518
-
Oliver Hader uploaded patch set 42
V -103/12/25, 15:32 -
Oliver Hader uploaded patch set 43 03/12/25, 15:32
-
core-ci voted on patch set 43 V +1 03/12/25, 15:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75520
-
Oliver Hader uploaded patch set 44
V +103/12/25, 22:34 -
core-ci voted on patch set 44 V +1 03/12/25, 22:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75528
-
Oliver Hader uploaded patch set 45
V +103/12/25, 22:51 -
core-ci voted on patch set 45 V +1 03/12/25, 22:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75529
-
Oliver Hader uploaded patch set 46
V +103/13/25, 14:33 -
core-ci voted on patch set 46 V -1 03/13/25, 14:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75552
-
Oliver Hader uploaded patch set 47
V -103/13/25, 14:48 -
core-ci voted on patch set 47 V +1 03/13/25, 14:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75553
-
Oliver Hader uploaded patch set 48
V +106/10/25, 15:07 -
core-ci voted on patch set 48 V -1 06/10/25, 15:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80153
-
Oliver Hader uploaded patch set 49
V -106/10/25, 19:42 -
core-ci voted on patch set 49 V -1 06/10/25, 19:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80157
-
Oliver Hader uploaded patch set 50
V -106/30/25, 06:29 -
core-ci voted on patch set 50 V +1 06/30/25, 06:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81134
-
Oliver Hader commented on patch set 50 08/28/25, 18:47
NonceValueSubstitution.php:44Unresolved`$currentNonce->consume()` should be just `(string)$currentNonce` then -
Garvin Hicking commented on patch set 50 09/03/25, 07:03
Is maybe https://gitlab.opencode.de/bmi/government-site-builder-11/extensions/gsb-csp helpful to inspect? (didn't check myself) -
Oliver Hader uploaded patch set 51
V +109/26/25, 13:55 -
core-ci voted on patch set 51 V +1 09/26/25, 14:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85613
-
Oliver Hader commented on patch set 51 10/07/25, 22:07
→ alternative approach focussing on avoiding nonces at https://review.typo3.org/c/Packages/TYPO3.CMS/+/90814 Introducing hash-collections is a separate future story then. -
Oliver Hader commented on patch set 51 03/28/26, 17:11
→ now approach at https://review.typo3.org/c/Packages/TYPO3.CMS/+/93419 -
Garvin Hicking commented on patch set 51 03/28/26, 17:41
Reply
Abandon this one for spring cleaning then? -
Oliver Hader commented on patch set 51 03/28/26, 20:49
Reply Unresolved
Let's keep this open for the time being. There are several aspects I did not cover in the new approach, yet. Basically just to keep the change "small" - e.g. AdminPanel and Nonce-Hint might be adjusted in follow-up patches.