Review main Abandoned

74923[BUGFIX] Streamline `isSystemMaintainer()` checks

Andreas Kienast CR 0 V 0 Normal +111 −12 updated 04/21/23, 11:26

Commit message

If `$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemMaintainers']` is an empty
array, every admin user considered being a system maintainer, as
documented at [1].

However, the implemented check aimed to check for an empty string to
disable this feature altogether is not sufficient, resulting in loss of
access to the system maintainer modules.

The checks in `BackendUserAuthentication->isSystemMaintainer()` are now
streamlined to cover this edge-case properly.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.0/Feature-82266-BackendUsersSystemMaintainers.html

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 5

Review log 1624

  1. Andreas Kienast uploaded patch set 1 06/17/22, 06:55

  2. Andreas Kienast uploaded patch set 2 06/17/22, 06:59

  3. core-ci voted on patch set 1 V -1 06/17/22, 07:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28121

  4. core-ci voted on patch set 2 V -1 06/17/22, 07:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28122

  5. Andreas Kienast uploaded patch set 3 06/17/22, 07:41

  6. core-ci voted on patch set 3 V -1 06/17/22, 07:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28125

  7. Andreas Kienast uploaded patch set 4 06/17/22, 07:58

  8. core-ci voted on patch set 4 V -1 06/17/22, 08:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28126

  9. Andreas Kienast uploaded patch set 5 06/17/22, 08:37

  10. core-ci voted on patch set 5 V +1 06/17/22, 08:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28130

  11. Andreas Kienast uploaded patch set 6 06/17/22, 12:34

  12. core-ci voted on patch set 6 V +1 06/17/22, 12:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28142

  13. Andreas Kienast updated the commit message in patch set 7 06/17/22, 13:18

  14. core-ci voted on patch set 7 V +1 06/17/22, 13:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28149

  15. Nikita Hovratov uploaded patch set 8 06/17/22, 19:19

  16. core-ci voted on patch set 8 V +1 06/17/22, 19:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28163

  17. Andreas Kienast commented on patch set 8 06/17/22, 19:35

    BackendUserAuthentication.php:454

    Wow, I didn't know about that syntax.
  18. Nikita Hovratov commented on patch set 8 06/17/22, 20:16

    BackendUserAuthentication.php:454 Reply

    Learned it by reading Larrys patches. Needs to be changed back of course for v11.
  19. Nikita Hovratov commented on patch set 8 V -1 06/17/22, 20:48

    BackendUserAuthentication.php:448

    This empty string for unsetting system maintainers smells fishy and was nowhere documented outside of this comment. And on top of that not implemented as stated. Why would you want to prevent accessing the install tool modules altogether anyway I wonder. Also I get "array_map(): Argument #2 ($array) must be of type array, string given" when setting an empty string and then calling /typo3/install.php in SessionService.php line 273 Is the problem only the MfaProvider tests, which need system maintainers to be disabled? Maybe we could come up there with another solution?
  20. Andreas Kienast commented on patch set 8 06/17/22, 20:58

    BackendUserAuthentication.php:448 Reply

    I also wondered about the empty string thing, but it's there since quite some time. The MfaProvider tests needs adoption because phpunit sends some headers which will cause issues once ->logoff() is called, this creates a new instance of SessionService, which will then throw errors as headers are already sent.
  21. Stefan Bürk commented on patch set 8 07/08/22, 21:13

    BackendUserAuthentication.php:448 Reply Unresolved

    I think we should ensure that SessionService only send "headers()" in real web requests (not cli/test). They are not checkable anyway.
  22. Benni Mack commented on patch set 8 04/14/23, 16:58

    Ping - how to proceed here?
  23. Andreas Kienast commented on patch set 8 04/21/23, 11:26

    Reply

    I'll abandon this for now
  24. Andreas Kienast abandoned the change 04/21/23, 11:26