Review main Merged

73731[BUGFIX] Avoid variable leaks in TCA/TCA Overrides

Stefan Bürk CR +2 V +2 Normal +231 −2 updated 03/05/22, 23:11

Commit message

All TCA and TCA overrides files are included without any
scoping. This means that variables defined in these files
can leak into the following files.

This patch loads 'TCA' and 'TCA/Overrides' files within
dedicated scopes with the help of anonymous methods in
the ExtensionManagementUtility. Thus separating the native
php 'require' calls from each other - scope wise. To ensure
this works and don't break in the future functional tests
are added.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 12

Review log 2433

Show 48 earlier messages
  1. Stefan Bürk uploaded patch set 1 02/26/22, 22:50

  2. Stefan Bürk updated the commit message in patch set 2 02/26/22, 22:53

  3. core-ci voted on patch set 1 V -1 02/26/22, 23:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24345

  4. core-ci voted on patch set 2 V -1 02/26/22, 23:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24346

  5. Stefan Bürk uploaded patch set 3 02/26/22, 23:06

  6. Stefan Bürk uploaded patch set 4 02/26/22, 23:11

  7. core-ci voted on patch set 3 V +1 02/26/22, 23:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24347

  8. core-ci voted on patch set 4 V +1 02/26/22, 23:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24348

  1. Stefan Bürk uploaded patch set 5 02/26/22, 23:34

  2. core-ci voted on patch set 5 V +1 02/26/22, 23:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24349

  3. Christian Kuhn commented on patch set 5 02/27/22, 14:57

    Looks good to me, but I'm unsure if we should merge this in v11: People do weird stuff, maybe we'd want to do it v12 only to not introduce something in v11?
  4. Stefan Bürk commented on patch set 5 02/27/22, 15:07

    Reply

    Ack. Let's play on safe ground.
  5. Stefan Bürk updated the commit message in patch set 6 02/27/22, 15:07

  6. core-ci voted on patch set 6 V +1 02/27/22, 15:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24378

  7. Mathias Brodala commented on patch set 6 02/28/22, 07:48

    ExtensionManagementUtility.php:1484

    This would lead to a hard type error if no array is returned. Which would be a breaking change since ...

    ExtensionManagementUtility.php:1497

    ... we silently skipped such a broken file as of now.
  8. Stefan Bürk commented on patch set 6 02/28/22, 08:23

    ExtensionManagementUtility.php:1484 Reply

    Ack. Can look into it later on. Will test what's ok for here (to be non breaking).
  9. Stefan Bürk voted on patch set 6 CR -1 02/28/22, 08:23

  10. Stefan Bürk uploaded patch set 7 02/28/22, 20:20

  11. Stefan Bürk commented on patch set 7 02/28/22, 20:21

    ExtensionManagementUtility.php:1484 Reply

    Done. Added test for it to and added corresponding note.

    ExtensionManagementUtility.php:1497 Reply

    Done
  12. core-ci voted on patch set 7 V +1 02/28/22, 20:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24390

  13. Stefan Bürk rebased onto patch set 8 03/01/22, 19:28

  14. core-ci voted on patch set 8 V +1 03/01/22, 19:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24416

  15. Mathias Brodala voted on patch set 8 CR +1 03/02/22, 07:47

  16. Nikita Hovratov commented on patch set 8 V +1 03/05/22, 00:49

    ExtensionManagementUtility.php:1486

    mitigated by an array

    ExtensionManagementUtilityTcaOverrideRequireTest.php:20

    fails

    ExtensionManagementUtilityTcaRequireTest.php:35

    fails
  17. Nikita Hovratov commented on patch set 8 03/05/22, 00:52

    The first part of this sentence reads icky.
  18. Stefan Bürk uploaded patch set 9 03/05/22, 11:47

  19. Stefan Bürk updated the commit message in patch set 10 03/05/22, 12:03

  20. Stefan Bürk commented on patch set 10 03/05/22, 12:05

    Reply

    Done

    ExtensionManagementUtility.php:1486 Reply

    Done

    ExtensionManagementUtilityTcaOverrideRequireTest.php:20 Reply

    Done

    ExtensionManagementUtilityTcaRequireTest.php:35 Reply

    Done
  21. core-ci voted on patch set 10 V +1 03/05/22, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24607

  22. Stefan Bürk commented on patch set 10 03/05/22, 12:35

    patchset 9 did not triggerd a pipeline run - thus no vote.
  23. Nikita Hovratov voted on patch set 10 V +1 CR +1 03/05/22, 21:03

  24. Christian Kuhn voted on patch set 10 V +2 CR +2 03/05/22, 23:11

  25. Christian Kuhn merged patch set 11 03/05/22, 23:11