Review main Merged

86417[BUGFIX] Prevent double flexform xml2array parsing

André Buchmann CR +2 V +2 Easy +5 −2 updated 10/08/24, 11:31

Commit message

Check the pi_flexform value of the request attribute
'currentContentObject' to be of type string before parsing with
GU::xml2array().

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1315

  1. André Buchmann uploaded patch set 1 10/04/24, 11:24

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

  3. Mathias Brodala commented on patch set 1 10/04/24, 12:20

    FormFrontendController.php:95

    If the change of behavior is caused by external changes in TYPO3, is the case "unparsed flexform" still valid at all?
  4. Garvin Hicking commented on patch set 1 10/04/24, 18:58

    Could you give an example on how to reproduce the error, maybe we would/should need to address this with a test case, too.
  5. André Buchmann commented on patch set 1 10/07/24, 09:31

    Reply

    Heyho Garvin, I've added a test extension to the forge issue to reproduce the scenario. The extension contains a "modern" set to reproduce the error and a "classic" set to test the established behavior

    FormFrontendController.php:95 Reply

    Yes, depending on the typoscript setup we can have two different scenarios. See details in the forge issue: https://forge.typo3.org/issues/105195#note-5
  6. Oli Bartsch uploaded patch set 2 V +1 10/08/24, 08:21

  7. Oli Bartsch voted on patch set 2 CR +1 V +1 10/08/24, 08:21

  8. core-ci voted on patch set 2 V +1 10/08/24, 08:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67340

  9. Christian Kuhn commented on patch set 2 10/08/24, 08:54

    is this a must have for v12? as far as i understood, the patch is v13 relevant only?
  10. Oli Bartsch commented on patch set 2 10/08/24, 09:09

    Reply

    While the "is already processed" topic is only relevant for v13, checking for a non empty string before calling xml2array() should be done in v12 as well. Additionally the non empty array check is relevant there, too. This also unifies usages across the code base, see e.g. FrontendConfigurationManager->overrideConfigurationFromFlexForm().
  11. Christian Kuhn commented on patch set 2 CR +1 V +1 10/08/24, 09:44

    Reply

    Acknowledged
  12. Garvin Hicking voted on patch set 2 CR +1 V +1 10/08/24, 10:14

  13. Stefan Bürk voted on patch set 2 CR +1 V +1 10/08/24, 11:26

  14. Stefan Bürk voted on patch set 2 CR +2 V +2 10/08/24, 11:31

  15. Stefan Bürk merged patch set 3 10/08/24, 11:31