Review main Merged

86541[BUGFIX] Ensure flexform data only contains a string or array

Ayke Halder CR +2 V +2 Easy +10 −3 updated 11/15/24, 19:52

Commit message

This ensure the flexform data is correct by being either empty or set
to one of "string" or "array".

In case of a string, it gets converted to array as before.

All other types will now lead to a warning being logged.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1623

  1. Ayke Halder uploaded patch set 1 10/09/24, 17:30

  2. core-ci voted on patch set 1 V -1 10/09/24, 17:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67459

  3. Ayke Halder uploaded patch set 2 V -1 10/09/24, 17:59

  4. core-ci voted on patch set 2 V +1 10/09/24, 18:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67461

  5. Oli Bartsch commented on patch set 2 10/10/24, 04:46

    FormPagePreviewRenderer.php:64

    I don’t think that we should throw an exception here. Especially not in v12. This is a hard behavior change and this part of the code is not that important for the request to be processed. We have a user friendly messages added in the else block in case the persistenceIdentifier can not be determined - be it because of just missing or the flex form being “invalid”. If at all, let’s log this but no exception.
  6. Mathias Brodala commented on patch set 2 10/10/24, 06:38

    FormPagePreviewRenderer.php:66

    You should use get_debug_type() instead here so that one gets the FQCN in case of "object". Also the leading backslash should be dropped as this pattern is not used in TYPO3.
  7. Ayke Halder uploaded patch set 3 V +1 10/10/24, 09:27

  8. Ayke Halder uploaded patch set 4 10/10/24, 09:29

  9. core-ci voted on patch set 3 V +1 10/10/24, 09:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67488

  10. Ayke Halder commented on patch set 4 10/10/24, 09:36

    FormPagePreviewRenderer.php:64 Reply

    The "missing flexform" case is already handled by: `$flexFormData = $row['pi_flexform'] ?? [];` So there is/was no exception/logging for missing flexform. ---- About the severity of invalid flexform data: No exception is thrown anymore. Instead this gets just logged as warning and the flexform data is set to the default empty array.

    FormPagePreviewRenderer.php:66 Reply

    Acknowledged
  11. core-ci voted on patch set 4 V +1 10/10/24, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67489

  12. Oliver Hader updated the commit message in patch set 5 V +1 10/18/24, 13:59

  13. Oliver Hader rebased onto patch set 6 11/15/24, 08:42

  14. core-ci voted on patch set 6 V +1 11/15/24, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69462

  15. Oli Bartsch updated the commit message in patch set 7 V +1 11/15/24, 10:41

  16. Oli Bartsch voted on patch set 7 CR +1 V +1 11/15/24, 10:41

  17. core-ci voted on patch set 7 V +1 11/15/24, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69471

  18. Ayke Halder updated the commit message in patch set 8 CR +1 V +1 11/15/24, 13:53

  19. core-ci voted on patch set 8 V +1 11/15/24, 14:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69485

  20. Benni Mack voted on patch set 8 CR +2 V +2 11/15/24, 16:53

  21. Benni Mack voted on patch set 8 CR +1 V +1 11/15/24, 16:53

  22. Oli Bartsch voted on patch set 8 CR +2 V +2 11/15/24, 19:52

  23. Oli Bartsch merged patch set 9 11/15/24, 19:52