78754[TASK] Allow nonce values explicitly in PageRenderer inline methods
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Alexander Stehlik +1
- Daniel Haupt +1
-
Verified V +2 Done
- Oliver Hader +2
- Daniel Haupt +1
- core-ci +1 CI
Issues 1
Files 8
- typo3/sysext/backend/Classes/Controller/LoginController.php+3 −3
- typo3/sysext/backend/Classes/Controller/MfaController.php+2 −2
- typo3/sysext/backend/Classes/Controller/MfaSetupController.php+2 −2
- typo3/sysext/backend/Classes/Controller/ResetPasswordController.php+3 −3
- typo3/sysext/backend/Classes/View/AuthenticationStyleInformation.php+3 −3
- typo3/sysext/core/Classes/Page/PageRenderer.php5+55 −38
- typo3/sysext/core/Classes/Utility/GeneralUtility.php2+11 −0
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php2+17 −0
Review log 2633
Show 58 earlier messages
-
Oliver Hader uploaded patch set 1 04/19/23, 14:38
-
core-ci voted on patch set 1 V -1 04/19/23, 15:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40909
-
Oliver Hader uploaded patch set 2
V -104/21/23, 22:48 -
core-ci voted on patch set 2 V -1 04/21/23, 22:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41069
-
Oliver Hader uploaded patch set 3
V -104/22/23, 09:25 -
core-ci voted on patch set 3 V +1 04/22/23, 09:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41084
-
Oliver Klee commented on patch set 3 04/22/23, 10:02
-
Oliver Klee commented on patch set 3 04/22/23, 10:03
GeneralUtility.php:3341We can inline `$value` here.
-
Oliver Hader uploaded patch set 4
V +104/22/23, 11:02 -
Oliver Hader commented on patch set 3 04/22/23, 11:02
GeneralUtility.php:3341ReplyDoneGeneralUtilityTest.php:1913ReplyDone -
core-ci voted on patch set 4 V +1 04/22/23, 11:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41088
-
Andreas Kienast commented on patch set 4 04/24/23, 13:44
Frontend\Http\RequestHandler->addCssToPageRenderer() calls PageRenderer->addCssInlineBlock() without nonce - on purpose? -
Oliver Klee wrote 04/24/23, 13:45
Removed cc Oliver Klee. -
Oliver Hader commented on patch set 4 04/24/23, 16:23
Reply
That's a different story - those are inline assets - each single one should be enabled explicitly to `useNonce`, which is not possible, since it just renders a big blob of string text. I'm reluctant to enable a nonce value per default - getting rid of inline assets basically is the goal, since it might contain XSS (more focussed on scripts than styles). -
Benni Mack updated the commit message in patch set 5
V +105/03/23, 09:47 -
Oliver Hader rebased onto patch set 6 05/03/23, 12:40
-
core-ci voted on patch set 6 V +1 05/03/23, 13:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41533
-
Alexander Stehlik commented on patch set 6 05/11/23, 08:40
PageRenderer.php:2151Does it make sense to resolve this TODO as well with this change? Currently using inlineLanguageLabelFiles causes a CSP violation. -
Oliver Hader commented on patch set 6 05/11/23, 09:32
PageRenderer.php:2151ReplyIn which context does it cause a CSP violation? -
Alexander Stehlik commented on patch set 6 05/11/23, 09:39
PageRenderer.php:2151ReplyI enabled the feature flag ecurity.frontend.enforceContentSecurityPolicy and use the TypoScript setting inlineLanguageLabelFiles (https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Setup/Page/Index.html#inlinelanguagelabelfiles) The script tag is rendered without nonce in the HTML which causes a CSP violation. In my tests this change resolved the issue: https://gist.github.com/astehlik/8105e17bd237448003f344345b0b398d -
Oliver Hader uploaded patch set 7
V +105/11/23, 09:52 -
Oliver Hader commented on patch set 7 05/11/23, 09:53
PageRenderer.php:2151ReplyGood catch! Thanks! I've updated this change using your Gist patch. -
Oliver Hader commented on patch set 7 05/11/23, 09:55
PageRenderer.php:2151ReplyThe `inlineJavascriptWrap` aspect was addressed in #100614 (deprecating the class property in favor of using the new method `wrapInlineScript`). -
core-ci voted on patch set 7 V +1 05/11/23, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41755
-
Alexander Stehlik voted on patch set 7 CR +1 05/11/23, 10:03
-
Daniel Haupt commented on patch set 7 05/13/23, 09:30
nit: to be sanitized -
Oliver Klee updated the commit message in patch set 8
CR +1V +105/13/23, 13:17 -
Oliver Klee commented on patch set 8 05/13/23, 13:17
Reply
Done -
Daniel Haupt voted on patch set 8 V +1 CR +1 05/13/23, 13:20
-
Alexander Stehlik voted on patch set 8 CR +1 05/13/23, 13:21
-
core-ci voted on patch set 8 V +1 05/13/23, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41797
-
Oliver Hader voted on patch set 8 V +2 CR +2 06/03/23, 08:24
-
Oliver Hader merged patch set 9 06/03/23, 08:25
GeneralUtilityTest.php:1913