Review main Merged

92309[SECURITY] Avoid record deletion without permissions in recycler module

Oliver Hader CR +2 V +2 Hard +422 −17 updated 01/13/26, 12:17

Commit message

The current implementation in ext:recycler fails to hard-delete selected
records with proper permission checks. This allows users to hard-delete
arbitrary pages and records, even if they lack required `tables_modify`
permissions. In addition, it turned out that the `deleteRecords` action
in the ext:recycler ajax route lacks proper authentication checks. Those
are already in place for the `getDeletedRecords` action.

This patch aims to fix this behavior in various steps:

1. Make sure to *not* disable record permission check when calling
   `DataHandler->deleteAction` by setting `$noRecordCheck = false`.
2. Implement a permission check in `DataHandler->deleteAction` to check
   if the current user has `tables_modify` permissions for the given
   table. This only applies if `$noRecordCheck = false` is set (which is
   the default behavior).
3. Extend `BackendUserAuthentication->doesUserHaveAccess` and
   `DataHandler->hasPagePermissions` to allow disabling the use of
   delete clauses that check if a record is deleted. This is necessary,
   since these methods are consumed by EXT:recycler as well, when trying
   to hard-delete a record. In this case, including a delete clause
   would resolve in unintended behavior. Thus, it needs to be disabled
   in this single case.
4. Streamline authentication checks in all necessary actions in
   ext:recycler AJAX route in order to prevent unauthorized deletion of
   permitted records. This check covers the UserTSconfig config option
   `mod.recycler.allowDelete` which must be set to `1`.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
  • Verified V +2 Done
    • Oliver Hader +2

Issues 1

Files 8

Review log 34

  1. Oliver Hader uploaded patch set 1 01/13/26, 11:34

  2. Oliver Hader commented on patch set 1 CR +2 V +2 01/13/26, 11:34

    Auto-approved
  3. Oliver Hader merged patch set 2 01/13/26, 11:34

  4. core-ci voted on patch set 1 V +1 01/13/26, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93350