Review main Merged

78660[BUGFIX] Handle dynamic CSP nonce values during frontend rendering

Oliver Hader CR +2 V +2 Normal +205 −12 updated 04/24/23, 13:22

Commit message

The CSP nonce value was not assigned in frontend rendering process.
Besides that, the value would have been cached statically, which is
not in line with the concept of a "number used once (nonce)".

A new `INT_SCRIPT´ instruction is added, which permanently post
processes cached data and replaces the cached nonce with the
dynamic value of the corresponding actual request.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 3451

Show 1526 earlier messages
  1. Oliver Hader uploaded patch set 1 04/15/23, 21:06

  2. core-ci voted on patch set 1 V +1 04/15/23, 22:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40712

  3. Oliver Hader uploaded patch set 2 V +1 04/16/23, 08:00

  4. Oliver Hader uploaded patch set 3 04/16/23, 08:30

  5. Oliver Hader uploaded patch set 4 04/16/23, 08:32

  6. core-ci voted on patch set 2 V -1 04/16/23, 08:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40728

  7. core-ci voted on patch set 4 V -1 04/16/23, 09:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40730

  8. Oliver Hader uploaded patch set 5 V -1 04/16/23, 12:14

  9. core-ci voted on patch set 5 V -1 04/16/23, 12:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40736

  10. Oliver Hader uploaded patch set 6 V -1 04/16/23, 13:21

  11. core-ci voted on patch set 6 V +1 04/16/23, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40741

  12. Oliver Hader uploaded patch set 7 V +1 04/19/23, 14:02

  13. core-ci voted on patch set 7 V -1 04/19/23, 14:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40901

  14. Oliver Hader uploaded patch set 8 V -1 04/19/23, 14:37

  15. core-ci voted on patch set 8 V -1 04/19/23, 15:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40908

  16. Oliver Hader uploaded patch set 9 V -1 04/19/23, 15:56

  17. core-ci voted on patch set 9 V +1 04/19/23, 16:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40917

  18. Oliver Hader uploaded patch set 10 V +1 04/20/23, 10:33

  19. core-ci voted on patch set 10 V +1 04/20/23, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40957

  20. Oliver Hader voted on patch set 10 CR -1 04/20/23, 15:57

  21. Oliver Hader uploaded patch set 11 CR -1 V +1 04/20/23, 16:04

  22. core-ci voted on patch set 11 V +1 04/20/23, 16:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40995

  23. Oliver Hader uploaded patch set 12 V +1 04/20/23, 17:03

  24. core-ci voted on patch set 12 V -1 04/20/23, 18:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41004

  25. Oliver Hader uploaded patch set 13 V -1 04/20/23, 19:19

  26. Oliver Hader uploaded patch set 14 04/20/23, 20:23

  1. Benni Mack commented on patch set 14 04/20/23, 20:26

    looks about right, can we have one functional for this, so we know it's working even if I fiddle around with intINCscript at a later point?
  2. core-ci voted on patch set 13 V -1 04/20/23, 20:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41006

  3. core-ci voted on patch set 14 V -1 04/20/23, 20:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41008

  4. Oliver Hader commented on patch set 14 04/21/23, 12:29

    Reply

    I don't know how to really test this, since functionals are not using a sub-request (as different process) anymore, but embed the logic in the very same PHP process.
  5. Oliver Hader commented on patch set 15 V -1 04/21/23, 12:31

    Published edit on patch set 14.
  6. Oliver Hader updated the commit message in patch set 16 04/21/23, 12:34

  7. core-ci voted on patch set 16 V +1 04/21/23, 12:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41033

  8. Oliver Hader marked it work in progress 04/21/23, 12:47

  9. Oliver Hader uploaded patch set 17 V +1 04/21/23, 14:08

  10. Oliver Hader commented on patch set 17 04/21/23, 14:11

    This change is ready for review.
    I've added a test case now - however, caching cannot be tested right now since it's disabled (and overridden) in `FunctionalTestCase`
  11. core-ci voted on patch set 17 V +1 04/21/23, 14:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41039

  12. Oliver Hader uploaded patch set 18 V +1 04/21/23, 20:25

  13. core-ci voted on patch set 18 V -1 04/21/23, 21:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41064

  14. Oliver Hader uploaded patch set 19 V -1 04/21/23, 22:53

  15. core-ci voted on patch set 19 V +1 04/21/23, 23:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41070

  16. Georg Ringer voted on patch set 19 CR +1 04/23/23, 06:31

  17. Benni Mack commented on patch set 19 04/24/23, 12:29

    RequestHandler.php:143

    can we use !empty() as count is more expensive
  18. Andreas Kienast commented on patch set 19 04/24/23, 12:51

    RequestHandler.php:143 Reply

    AFACS, `count()` refers to `ConsumableString`, which implements `\Countable` that returns the value of an internal counter.
  19. Oliver Hader commented on patch set 19 04/24/23, 12:51

    RequestHandler.php:143 Reply

    This won't work - `$nonce` is a `Countable`, but `!emtpy($nonce)` will always be true, since if checks the object (which is not empty). An alternative would be `$nonce->count() !== 0`...
  20. Benni Mack commented on patch set 19 04/24/23, 12:52

    RequestHandler.php:143 Reply

    fine then
  21. Oliver Hader commented on patch set 19 04/24/23, 12:52

    RequestHandler.php:143 Reply

    (what Andy said 😊)
  22. Oliver Hader commented on patch set 19 04/24/23, 12:54

    RequestHandler.php:143 Reply

    Done
  23. Andreas Kienast voted on patch set 19 V +1 CR +1 04/24/23, 13:10

  24. Georg Ringer voted on patch set 19 V +2 CR +2 04/24/23, 13:22

  25. Georg Ringer merged patch set 20 04/24/23, 13:22