Review main Merged

85548[BUGFIX] Prevent PHP array access errors on invalid shortcut entries

Garvin Hicking CR +2 V +2 Easy +3 −3 updated 08/07/24, 17:21

Commit message

If an invalid record in `sys_be_shortcuts` is stored like this:

```
INSERT INTO sys_be_shortcuts (userid,route,arguments)
     VALUES (1,'record_edit','[]');
```

then the backend cannot be accessed anymore due to PHP
errors due to unguarded array key access of the
"arguments" contents.

This patch guards the array key access to prevent such
a situation, so an invalid shortcut can be deleted from
the menu.

Database records like this might happen for migrated older
installations.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Anja Leichsenring +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 79

  1. Garvin Hicking uploaded patch set 1 08/06/24, 22:14

  2. core-ci voted on patch set 1 V +1 08/06/24, 22:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62976

  3. Georg Ringer voted on patch set 1 CR +1 V +1 08/07/24, 05:28

  4. Chris Müller voted on patch set 1 CR +1 08/07/24, 05:48

  5. Benni Mack updated the commit message in patch set 2 CR +1 V +1 08/07/24, 08:11

  6. core-ci voted on patch set 2 V +1 08/07/24, 08:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62991

  7. Anja Leichsenring voted on patch set 2 CR +1 V +1 08/07/24, 16:23

  8. Stefan Bürk voted on patch set 2 CR +2 V +2 08/07/24, 16:48

  9. Stefan Bürk merged patch set 3 08/07/24, 17:21