Review 14.3 Merged

97559[BUGFIX] Reject invalid form page index gracefully

Benni Mack CR +2 V +2 Normal +134 −4 updated 11/11/26, 21:17

Commit message

The internal "__currentPage" argument of ext:form was cast to int
without any validation. Manipulated values like "-1 OR 5*5=25 -- ",
as sent by bots, resulted in a FormException about a non-existing
page, which got logged with alert severity for every request.

The value is now validated to be a non-negative integer. Otherwise
a BadRequestException is thrown, rendering the usual error message
in the frontend. Its exception code is registered as ignored code
in the exception handlers, the same way as for failed HMAC
validations, to avoid flooding the log with forged requests.

Review

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

Issues 1

Files 6

Review log 46

  1. Benni Mack commented on patch set 1 11/11/26, 17:04

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 11/11/26, 17:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114132

  3. Georg Ringer uploaded patch set 2 V -1 11/11/26, 20:04

  4. core-ci voted on patch set 2 V +1 11/11/26, 20:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114139

  5. Benni Mack voted on patch set 2 CR +2 V +2 11/11/26, 21:17

  6. Benni Mack merged patch set 3 11/11/26, 21:17