Review main Merged

80756[BUGFIX] Replace CSP mutation mode extend by inherit & append

Oliver Hader CR +2 V +2 Normal +167 −55 updated 10/26/23, 08:31

Commit message

MutationMode::Extend has some ambiguity when being invoked
multiple times on modified ancestor source collections.
This change introduces the new MutationMode::InheritOnce,
MutationMode::InheritAgain and MutationMode::Append.

The implicit behavior of MutationMode::Extend changes from the
combination of MutationMode::InheritAgain + MutationMode::Append
to MutationMode::InheritOnce + MutationMode::Append to avoid
side effects with more configurations modifying the policy.

Static mutations loaded from ContentSecurityPolicies.php are
ordered accordoring to the packages dependency hierarchy. That
is the reason, the configuration from ext:core had to be moved
to both ext:backend and ext:frontend.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Benjamin Franzke +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Benjamin Franzke +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 2028

Show 23 earlier messages
  1. Oliver Hader uploaded patch set 1 08/30/23, 11:29

  2. core-ci voted on patch set 1 V -1 08/30/23, 11:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46031

  3. Oliver Hader uploaded patch set 2 V -1 08/30/23, 15:26

  1. Oliver Hader wrote 08/30/23, 15:31

    Topic set to csp
  2. Oliver Hader uploaded patch set 3 08/30/23, 15:35

  3. core-ci voted on patch set 3 V -1 08/30/23, 15:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46051

  4. Oliver Hader commented on patch set 3 CR -1 08/30/23, 17:18

    Fails, since order of packages is not reflecting the dependency hierarchy - most of that information is actually not available in `composer.json`. Thus, my assumption, it would have been ordered is wrong... For instance `ext:extensionmanager` is processed before `ext:backend` - it actually should have a dependency to `ext:backend`, which does not exist. Without having a reliable order, any inheritance chain does not work.
  5. Oliver Hader uploaded patch set 4 CR -1 V -1 08/30/23, 17:49

  6. core-ci voted on patch set 4 V -1 08/30/23, 17:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46057

  7. Oliver Hader commented on patch set 4 CR -1 08/31/23, 11:52

  8. Oliver Hader rebased onto patch set 5 CR -1 V -1 08/31/23, 13:46

  9. core-ci voted on patch set 5 V -1 08/31/23, 14:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46102

  10. Oliver Hader uploaded patch set 6 V -1 08/31/23, 14:19

  11. core-ci voted on patch set 6 V +1 08/31/23, 14:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46107

  12. Oliver Hader commented on patch set 6 08/31/23, 14:30

    This change is ready for review.
  13. Oliver Hader uploaded patch set 7 V +1 09/19/23, 14:18

  14. core-ci voted on patch set 7 V +1 09/19/23, 14:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46794

  15. Oliver Hader uploaded patch set 8 V +1 09/19/23, 17:32

  16. core-ci voted on patch set 8 V +1 09/19/23, 17:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46809

  17. Oliver Hader rebased onto patch set 9 V +1 09/20/23, 09:43

  18. core-ci voted on patch set 9 V +1 09/20/23, 09:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46865

  19. Stefan Bürk voted on patch set 9 CR +1 09/20/23, 18:57

  20. Stefan Bürk voted on patch set 9 V +1 10/17/23, 07:53

  21. Benjamin Franzke commented on patch set 9 CR +1 10/26/23, 07:25

    I would prefer we had some kind of "late static binding" extensions, that says: "whatever is changed on the ancestor sometime later, please inherit" Maybe that could be "InheritStatic". Anyway I'm still fine with this patch as is.
  22. Benjamin Franzke voted on patch set 9 V +1 10/26/23, 07:36

  23. Oliver Hader voted on patch set 9 V +2 CR +2 10/26/23, 08:28

  24. Oliver Hader merged patch set 10 10/26/23, 08:29

  25. Oliver Hader commented on patch set 10 10/26/23, 08:31

    Reply

    Thx. I've create a new issue at https://forge.typo3.org/issues/102262
    Thx folks, for your reviews & tests!