Review main Merged

86394[BUGFIX] Sanitize TS value modifiers with null values

Karsten Nowak CR +2 V +2 Normal +76 −4 updated 10/15/24, 10:11

Commit message

Fix issue if `foo := removeFromList()` and some other
value modifactors are used on values that have not
been set.

v13 can trigger PHP errors since #101453 made
GU::trimExplode() more strict.

Review

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

Issues 3

Files 2

Review log 1419

  1. Karsten Nowak uploaded patch set 1 10/01/24, 15:35

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

  3. Christian Kuhn updated the commit message in patch set 2 V +1 10/02/24, 10:00

  4. Christian Kuhn updated the commit message in patch set 3 10/02/24, 10:02

  5. Christian Kuhn commented on patch set 3 10/02/24, 10:03

    only v13: trimEplode() got a string type hint in v13 only, not v12.
  6. core-ci voted on patch set 2 V +1 10/02/24, 10:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66965

  7. Christian Kuhn commented on patch set 3 10/02/24, 10:08

    patch would be good to go, but i think we should cover the other three cases too, while we are at it? would you like to step in and extend the patch a bit?

    AbstractAstBuilder.php:229

    +1 in general (the added tests shows this well, and the additional test also fails if this "?? ''" is left out. good job!

    AbstractAstBuilder.php:236

    this is probably affected as well, we could/should extend the patch to cover this as well (including a test)?

    AbstractAstBuilder.php:239

    same.

    AbstractAstBuilder.php:242

    same.
  8. core-ci voted on patch set 3 V +1 10/02/24, 10:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66966

  9. Karsten Nowak uploaded patch set 4 V +1 10/02/24, 20:37

  10. core-ci voted on patch set 4 V +1 10/02/24, 20:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66986

  11. Karsten Nowak commented on patch set 4 10/02/24, 20:50

    Reply

    I have now extended the patch also for uniqueList, reverseList and sortList. Also added tests for it. I have omitted test for numeric sorting and descending numeric sorting. For me it makes no sense to test those cases and I don't know how can I test this. Numeric sorting always throws an error if the `$elements` are not all numeric. That always happens when `$originalValue` is null.
  12. Garvin Hicking voted on patch set 4 CR +1 V +1 10/02/24, 21:24

  13. Christian Kuhn commented on patch set 4 10/15/24, 09:40

    AbstractAstBuilder.php:236 Reply

    Done

    AbstractAstBuilder.php:239 Reply

    Done

    AbstractAstBuilder.php:242 Reply

    Done
  14. Christian Kuhn uploaded patch set 5 CR +1 V +1 10/15/24, 09:50

  15. Christian Kuhn commented on patch set 5 CR +1 V +1 10/15/24, 09:51

    Reply

    this looks good. thank you!
  16. Garvin Hicking voted on patch set 5 CR +1 V +1 10/15/24, 09:54

  17. core-ci voted on patch set 5 V +1 10/15/24, 09:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67826

  18. Christian Kuhn voted on patch set 5 CR +2 V +2 10/15/24, 10:10

  19. Christian Kuhn merged patch set 6 10/15/24, 10:11