Review main Merged

83022[TASK] Prevent password policy warning in BackendUserPasswordCheck

Torben Hansen CR +2 V +2 Easy +7 −5 updated 02/20/24, 21:38

Commit message

The dataHandler hook implementation `BackendUserPasswordCheck` sets
a random password for a new backend user, if the provided password
is empty in `$incomingFieldArray`. The generated password is a
random HMAC string, which does not fulfill the requirements of
the default TYPO3 password policy. As a result, a password policy
warning is shown.

This change ensures, that the generated random password at least
fulfills the default TYPO3 password policy.

Review

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

Issues 1

Files 1

Review log 1013

  1. Torben Hansen uploaded patch set 1 02/17/24, 08:40

  2. core-ci voted on patch set 1 V +1 02/17/24, 08:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53271

  3. Guido Schmechel commented on patch set 1 02/17/24, 10:40

    BackendUserPasswordCheck.php:59

    Random::DEFAULT_PASSWORD_LENGTH; But unfortunately athis private constant. Do you then accept the duplication of the 16 or do you change the constant from private to public? Alternatively, you can simply omit the length, because the 16 is fixed in the random class.
  4. Torben Hansen uploaded patch set 2 V +1 02/17/24, 12:20

  5. Torben Hansen commented on patch set 2 02/17/24, 12:22

    BackendUserPasswordCheck.php:59 Reply

    Thanks for the hint. I removed the length now, so we automatically fall back to 16 chars.
  6. core-ci voted on patch set 2 V +1 02/17/24, 12:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53282

  7. Guido Schmechel commented on patch set 2 02/19/24, 20:55

    Apart from the nitpick, it looks good :-)
    warning
  8. Benni Mack updated the commit message in patch set 3 V +1 02/19/24, 22:05

  9. Benni Mack commented on patch set 3 CR +1 02/19/24, 22:06

    Reply

    Done
  10. core-ci voted on patch set 3 V +1 02/19/24, 22:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53348

  11. Benjamin Franzke voted on patch set 3 CR +1 V +1 02/20/24, 10:34

  12. Oli Bartsch voted on patch set 3 CR +2 V +2 02/20/24, 21:38

  13. Oli Bartsch merged patch set 4 02/20/24, 21:38