Review 12.4 Merged

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

Oliver Hader CR +2 V +2 Hard +478 −54 updated 01/13/26, 11:44

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->deleteEl` by setting `$noRecordCheck = false`.
2. Implement a permission check in `DataHandler->deleteEl` 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 several methods in `BackendUserAuthentication`, `BackendUtility`
   and `DataHandler` to allow disabling the use of delete clauses that
   check if a record is deleted. This is necessary, since these method 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 11

Review log 34

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

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

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

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