Review main Merged

76445[FEATURE] Use password policy for password reset in ext:felogin

Torben Hansen CR +2 V +2 Hard +305 −15 updated 03/24/23, 13:34

Commit message

The password reset feature for TYPO3 frontend users does now consider
the configurable password policy introduced in #97388, if the new
feature toggle `security.usePasswordPolicyForFrontendUsers` is active.

Password validation configured through
`plugin.tx_felogin_login.settings.passwordValidators` has been
marked as deprecated.

Additionally, the `getLanguageService` function in
`AbstractPasswordValidator` has been adopted to support both backend and
frontend context.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Benni Mack +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 12

Review log 3655

Show 1730 earlier messages
  1. Torben Hansen uploaded patch set 1 11/05/22, 18:09

  2. core-ci voted on patch set 1 V +1 11/05/22, 18:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33149

  3. Chris Müller uploaded patch set 2 11/05/22, 21:49

  4. Chris Müller uploaded patch set 3 11/05/22, 21:50

  5. core-ci voted on patch set 3 V +1 11/05/22, 21:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33157

  6. core-ci voted on patch set 2 V +1 11/05/22, 22:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33156

  7. Benni Mack commented on patch set 3 11/15/22, 22:21

    AbstractPasswordValidator.php:119

    this check must be the very first, I think. If you are in Frontend (but logged in Backend), the Frontend language should be used.
  8. Torben Hansen rebased onto patch set 4 11/18/22, 18:39

  9. Torben Hansen uploaded patch set 5 11/18/22, 18:43

  10. Torben Hansen commented on patch set 5 11/18/22, 18:43

    AbstractPasswordValidator.php:119 Reply

    Done
  11. core-ci voted on patch set 4 V +1 11/18/22, 18:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33931

  12. core-ci voted on patch set 5 V -1 11/18/22, 18:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33932

  13. Torben Hansen uploaded patch set 6 11/19/22, 06:44

  14. Torben Hansen commented on patch set 6 11/19/22, 06:46

    AbstractPasswordValidator.php:119 Reply

    Note, I was not able to mock the `LanguageServiceFactory` in the test, so I moved the creation of the instance into the condition, which is executed in FE context only.
  15. core-ci voted on patch set 6 V +1 11/19/22, 06:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33941

  16. Benni Mack commented on patch set 7 V +1 12/06/22, 10:50

    Published edit on patch set 6.
  17. core-ci voted on patch set 7 V +1 12/06/22, 11:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34711

  18. Torben Hansen uploaded patch set 8 V +1 12/16/22, 08:41

  19. core-ci voted on patch set 8 V +1 12/16/22, 08:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35192

  20. Torben Hansen rebased onto patch set 9 V +1 01/16/23, 09:44

  21. core-ci voted on patch set 9 V +1 01/16/23, 09:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35842

  22. Benni Mack wrote 01/20/23, 11:03

    Removed cc Benni Mack.
  23. Torben Hansen rebased onto patch set 10 V +1 02/07/23, 18:19

  24. core-ci voted on patch set 10 V +1 02/07/23, 18:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37306

  25. Benni Mack commented on patch set 11 V +1 02/08/23, 07:49

    Published edit on patch set 10.
  26. core-ci voted on patch set 11 V +1 02/08/23, 08:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37327

  27. Torben Hansen rebased onto patch set 12 V +1 02/22/23, 17:56

  28. core-ci voted on patch set 12 V +1 02/22/23, 18:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37987

  29. Torben Hansen rebased onto patch set 13 V +1 03/12/23, 17:50

  30. core-ci voted on patch set 13 V +1 03/12/23, 18:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38840

  1. Markus Klein commented on patch set 13 03/16/23, 09:58

    setup.typoscript:48

    Isn't this a breaking change?
  2. Torben Hansen commented on patch set 13 03/16/23, 10:03

    setup.typoscript:48 Reply

    Not really. We remove the old password validation and replace it with the new password policies in the default configuration of ext:felogin. It is however still possible to use the (now deprecated) `passwordValidators` TypoScript setting, so this will not break custom password validators configured in TypoScript-
  3. Guido Schmechel voted on patch set 13 V +1 CR +1 03/20/23, 21:22

  4. Nikita Hovratov uploaded patch set 14 CR +1 V +1 03/22/23, 14:11

  5. core-ci voted on patch set 14 V +1 03/22/23, 14:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39386

  6. Nikita Hovratov commented on patch set 14 03/22/23, 14:24

    setup.typoscript:48 Reply

    So this means all installations, which use the default configuration, will have their password policies updated to the new default requirements. - What about a custom value set for the constant `newPasswordMinLength`? If someone set e.g. 12 it will now be lowered to 8. Increasing the requirements is ok I think, but lowering not. - The other thing is, when someone is using (the now deprecated) passwordValidators, the validation is now mixed with the new default password policies. I think we should use either or, but not both mixed.
  7. Torben Hansen commented on patch set 14 03/22/23, 14:56

    setup.typoscript:48 Reply

    Yes, that will basically be the consequence of the change, that in fe_users context the new default password policy will be used (which they should IMO). Lowering is of course bad. What could be done here? Add a routine, which checks, if the password min length in the password validator is lower and then increase it globally? No, not really a good idea, since it may mix up FE/BE password policies if they share the config (default). Maybe add an update wizard which takes care of creating a new password policy for fe_users context, if `newPasswordMinLength` > 8 or at least notices the admin about this? Or we leave it as it is, keep all TS validators, accept that we have mixed validators and possible validation messages for the same check. User may be annoyed and admin will have to make adjustments manually - but still an option for me to get this change in. Maybe the best option. Or add an Important.rst that admins must check, if `newPasswordMinLength` may be lowered? Last option is to completely exclude fe_users from password policies is at least one TS validator is set (which might always be the case, since users typically include ext:felogin TS in their setup). I'm available for changes here, but need feedback how to proceed. We have just a few days before feature-freeze and time is running up to get password policies in a strict way into v12.
  8. Benni Mack commented on patch set 14 03/22/23, 15:09

    setup.typoscript:48 Reply

    I suggest we just add another toggle in the constants. "styles.content.loginform.useNewValidator = 1" or something like that? Or we use a Feature Switch in the DefaultConfiguration to use the old vs. new one?
  9. Torben Hansen commented on patch set 14 03/22/23, 17:51

    setup.typoscript:48 Reply

    As discussed we proceed with: - A feature toggle to use the Password Policies (default = true for new TYPO3 installations) - An update wizard, where the administrator must decide if password policies or the old TypoScript validation will be used for fe_users records
  10. Torben Hansen marked it work in progress 03/23/23, 07:31

  11. Torben Hansen uploaded patch set 15 V +1 03/23/23, 14:27

  12. core-ci voted on patch set 15 V +1 03/23/23, 14:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39477

  13. Torben Hansen rebased onto patch set 16 V +1 03/23/23, 15:49

  14. core-ci voted on patch set 16 V +1 03/23/23, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39481

  15. Torben Hansen uploaded patch set 17 V +1 03/23/23, 18:11

  16. Torben Hansen marked it ready for review 03/23/23, 18:12

  17. core-ci voted on patch set 17 V +1 03/23/23, 18:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39488

  18. Torben Hansen updated the commit message in patch set 18 V +1 03/24/23, 08:08

  19. core-ci voted on patch set 18 V +1 03/24/23, 08:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39522

  20. Benni Mack voted on patch set 18 V +1 CR +1 03/24/23, 11:40

  21. Nikita Hovratov uploaded patch set 19 CR +1 V +1 03/24/23, 12:58

  22. Nikita Hovratov voted on patch set 19 V +1 CR +1 03/24/23, 12:59

  23. core-ci voted on patch set 19 V +1 03/24/23, 13:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39547

  24. Benni Mack voted on patch set 19 V +2 CR +2 03/24/23, 13:34

  25. Benni Mack merged patch set 20 03/24/23, 13:34