Review main Merged

87103[BUGFIX] Prevent BackendUtility::getRecord() postgresql out of range

Garvin Hicking CR +2 V +2 Normal +51 −27 updated 11/20/24, 18:53

Commit message

This is a pre-patch for #94562: It has been discovered that
on postgresql a BackendUtility::getRecord() lookup with
a uid larger than the integer range raises a DriverException.

However, DataHandler and softrefParsers will only expect
a null response from such a query with UID ranges out of
bounds to carry on further exemptions (which is why
throwing an exception is not helpful for this).

This patch adds a test verifying this failure and
adds an early return in case of out of bound lookups.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 1418

  1. Garvin Hicking uploaded patch set 1 11/20/24, 16:34

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

  3. Christian Kuhn commented on patch set 1 CR -1 11/20/24, 16:50

    on it.
  4. Christian Kuhn uploaded patch set 2 CR -1 V +1 11/20/24, 16:58

  5. core-ci voted on patch set 2 V +1 11/20/24, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69819

  6. Christian Kuhn voted on patch set 2 CR +1 V +1 11/20/24, 17:27

  7. Stefan Bürk commented on patch set 2 11/20/24, 17:49

    BackendUtility.php:90

    `This` instead of `Thiis`
  8. Stefan Bürk commented on patch set 2 11/20/24, 17:53

    BackendUtilityTest.php:233

    Why not asserting `NULL` here ? Code returns null in this case for all platforms.

    BackendUtilityTest.php:246

    Why not asserting `NULL` here ? Code returns null in this case for all platforms.
  9. Stefan Bürk commented on patch set 2 11/20/24, 17:56

    BackendUtilityTest.php:246 Reply

    Sory, that should be for method above.
  10. Andreas Kienast uploaded patch set 3 CR +1 V +1 11/20/24, 17:59

  11. Andreas Kienast commented on patch set 3 CR +1 V +1 11/20/24, 18:00

    BackendUtility.php:90 Reply

    Done

    BackendUtilityTest.php:233 Reply

    Done

    BackendUtilityTest.php:246 Reply

    Done
  12. Andreas Kienast uploaded patch set 4 CR +1 V +1 11/20/24, 18:00

  13. Andreas Kienast voted on patch set 4 CR +1 V +1 11/20/24, 18:00

  14. core-ci voted on patch set 3 V -1 11/20/24, 18:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69836

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

  16. Stefan Bürk voted on patch set 4 CR +1 V +1 11/20/24, 18:31

  17. Andreas Kienast voted on patch set 4 CR +2 V +2 11/20/24, 18:52

  18. Andreas Kienast merged patch set 5 11/20/24, 18:53