Review main Merged

67993[TASK] MFA providers should check their internal state

Oli Bartsch CR +2 V +2 Normal +112 −42 updated 02/22/21, 22:12

Commit message

Since there are use cases in which the internal state of a provider may
have changed since the view was initially rendered (e.g. when using
multiple tabs), the provider has to check internal state prior the
execution of the requested operation.

This patch furthermore performs some clean ups:

* Fix some typos
* Check if the requested action can be performed on the given provider
* Add missing exception in case a non existent provider is being updated
* Use existing isSystemMaintainer() method over manual evaluation
* Prevent provider setup instructions to grow too large

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • TYPO3com +1 CI
    • core-ci +1 CI

Issues 1

Files 13

Review log 1222

  1. Oli Bartsch uploaded patch set 1 02/22/21, 12:47

  2. TYPO3com voted on patch set 1 V -1 02/22/21, 12:59 Completed build in 12m 09s on Mon, 22 Feb, 12:59 PM Test Summary: 32295 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9657

  3. core-ci voted on patch set 1 V +1 02/22/21, 13:04 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/884

  4. TYPO3com voted on patch set 1 V +1 02/22/21, 13:08 Completed build in 33m 05s on Mon, 22 Feb, 01:08 PM Test Summary: 32684 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9657

  5. Benni Mack voted on patch set 1 CR +1 02/22/21, 14:56

  6. Benjamin Franzke uploaded patch set 2 02/22/21, 19:12

  7. Benjamin Franzke commented on patch set 2 02/22/21, 19:12

    MfaInfoElement.php:71

    Hm, this reads all fine and correct, but.. $targetUser->isSystemMaintainer does not work reliably, as it calls to $GLOBALS['BE_USER']->getOriginalUserIdWhenInSwitchUserMode() and if that returns trueish, it will return false for `isSystemMaintainer()`. This means this will always cause `$targetUser` to not be considered as system maintainer (although it is) in switch user mode. Now, that means an admin can create another admin, switch to it, and then deactivate the providers of a system maintainer.

    Setup.html:18

    The intention is to undo the display:flex effect that alert stretches the full height of the first column, right? We should rather wrap this in a `<div class="col-md-4">` and avoid inline styling.
  8. Benjamin Franzke commented on patch set 2 02/22/21, 19:14

    Setup.html:18 Reply

    Done in patchset 2 (forgot to mark resolved)
  9. TYPO3com voted on patch set 2 V +1 02/22/21, 19:19 Completed build in 06m 59s on Mon, 22 Feb, 07:19 PM Test Summary: 32686 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9662

  10. core-ci voted on patch set 2 V +1 02/22/21, 19:22 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/893

  11. Oli Bartsch uploaded patch set 3 02/22/21, 19:34

  12. Benjamin Franzke voted on patch set 3 CR +1 02/22/21, 19:39

  13. TYPO3com voted on patch set 3 V +1 02/22/21, 19:42 Completed build in 07m 33s on Mon, 22 Feb, 07:42 PM Test Summary: 32686 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9663

  14. core-ci voted on patch set 3 V +1 02/22/21, 19:45 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/894

  15. Benjamin Franzke commented on patch set 3 CR -1 02/22/21, 19:52

    CR -1 for now, need to perform some tests with mfa_webauthn (and maybe mfa_yubikey) regarding implicit inActive state (when number of tokens go from positiv to zero).
  16. Benjamin Franzke uploaded patch set 4 02/22/21, 20:06

  17. TYPO3com voted on patch set 4 V -1 02/22/21, 20:16 Completed build in 09m 32s on Mon, 22 Feb, 08:16 PM Test Summary: 15572 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9664

  18. core-ci voted on patch set 4 V +1 02/22/21, 20:16 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/895

  19. TYPO3com voted on patch set 4 V +1 02/22/21, 20:33 Completed build in 10m 26s on Mon, 22 Feb, 08:33 PM Test Summary: 32686 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9666

  20. Benjamin Franzke commented on patch set 4 02/22/21, 22:05

    MfaInfoElement.php:71 Reply

    Done
  21. Benni Mack voted on patch set 4 V +2 CR +2 02/22/21, 22:12

  22. Benni Mack merged patch set 5 02/22/21, 22:12