Review 11.5 Merged

84829[BUGFIX] Fix array access error in EditableRestriction

Christian Kuhn CR +2 V +2 Easy +6 −1 updated 06/21/24, 12:39

Commit message

The class EditableRestriction is used in EXT:linkvalidator to apply
permission restrictions to database queries for current (non-admin)
BE user.

In case of table sys_file_reference, the value for
$GLOBALS['TCA'][$table]['ctrl']['type'] might be "uid_local:type". In
that case, the class EditableRestriction tried to access the TCA
configuration for this field via $GLOBALS['TCA']['sys_file_reference']
['columns']['uid_local:type']['config']
when in fact this will be empty (and the type refers to the table
sys_file).

We now check if the resulting array is empty and skip the check if
that is the case.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 2

Files 1

Review log 47

  1. Christian Kuhn uploaded patch set 1 06/21/24, 12:10

  2. core-ci voted on patch set 1 V -1 06/21/24, 12:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60009

  3. Benni Mack uploaded patch set 2 06/21/24, 12:21

    Copied Votes: * Verified-1 (copy condition: "**changekind:NO_CHANGE**")
  4. core-ci voted on patch set 1 V +1 06/21/24, 12:31 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 2 (was Verified-1) (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60009

  5. core-ci voted on patch set 2 V +1 06/21/24, 12:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60011

  6. Christian Kuhn voted on patch set 2 CR +2 V +2 06/21/24, 12:39

  7. Christian Kuhn merged patch set 3 06/21/24, 12:39