Skip to content

[upstream] [BUGFIX] Reject invalid form page index gracefully - #78

Draft
github-actions[bot] wants to merge 1 commit into
release/v14from
upstream-sync/533484b037
Draft

github-actions[bot] wants to merge 1 commit into
release/v14from
upstream-sync/533484b037

Conversation

@github-actions

Copy link
Copy Markdown

Automatisch vorgeschlagener Cherry-pick aus TYPO3-CMS/form @ 14.3.

⚠ Conflict detected — diese PR enthält Konfliktmarker und ist als Draft markiert.
Bitte lokal auschecken, manuell auflösen, dann das Label needs-conflict-resolution entfernen und die PR aus dem Draft-Status nehmen.

Upstream-Commit

Commit-Message

Upstream-Commit-Message anzeigen
[BUGFIX] Reject invalid form page index gracefully

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.

Resolves: #111026
Releases: main, 14.3
Signed-off-by: Nikita Hovratov <nikita.h@live.de>
Change-Id: I273ecab2fb8fcbc236ebb5947b73798af1667056
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/97559
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: core-ci <typo3@b13.com>


Erzeugt von .github/workflows/upstream-sync.yml.
Um diesen Commit künftig nicht erneut vorzuschlagen, schließe die PR ohne Merge — der Marker unten bleibt erhalten.

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.

Resolves: #111026
Releases: main, 14.3
Signed-off-by: Nikita Hovratov <nikita.h@live.de>
Change-Id: I273ecab2fb8fcbc236ebb5947b73798af1667056
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/97559
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: core-ci <typo3@b13.com>

(cherry picked from commit 533484b037a42d783e52d33e7265923814346b62)

[CONFLICT — manual resolution required]
@github-actions github-actions Bot added upstream-sync Automatically proposed cherry-pick from upstream needs-conflict-resolution Cherry-pick had conflicts, manual resolution required bugfix Bugfix from upstream labels Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bugfix from upstream needs-conflict-resolution Cherry-pick had conflicts, manual resolution required upstream-sync Automatically proposed cherry-pick from upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant