Review main Merged

78259[FEATURE] Add PSR-14 event to enrich password validation ContextData

Torben Hansen CR +2 V +2 Normal +184 −1 updated 03/27/23, 19:13

Commit message

A new PSR-14 event `EnrichPasswordValidationContextDataEvent` is
introduced to allow extension authors to enrich the `ContextData` DTO
before a password is validated against a password policy.

Additionally, the `ContextData` DTO in the `PasswordReset` class
now includes the backend user username and realName attribute,
which can be used in custom password policy validators.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 1415

  1. Torben Hansen uploaded patch set 1 03/26/23, 10:33

  2. core-ci voted on patch set 1 V +1 03/26/23, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39640

  3. Oliver Hader voted on patch set 1 CR +1 03/26/23, 14:36

  4. Oliver Hader voted on patch set 1 V +1 03/26/23, 14:38

  5. Oliver Hader commented on patch set 1 03/26/23, 14:40

    EnrichPasswordValidationContextDataEvent.php:50

    Would it make sense to have the real initiating object here instead of just the class name? I'd be fine with both ways, I just was asking myself the question about pros/cons...
  6. Benni Mack commented on patch set 1 03/27/23, 07:33

    EnrichPasswordValidationContextDataEvent.php:50 Reply

    do we need this?
  7. Oliver Hader commented on patch set 1 03/27/23, 08:35

    EnrichPasswordValidationContextDataEvent.php:50 Reply

    Not a requirement to have an instance here.
  8. Torben Hansen commented on patch set 1 03/27/23, 08:36

    EnrichPasswordValidationContextDataEvent.php:50 Reply

    I thought about providing the instance of the object but dropped the idea, since most instances are controllers with basically not many public accessible properties. So I think it is ok to just use the classname in the event, so extension can differentiate, in which class the `ContextData` DTO has been created.
  9. Simon Schaufelberger voted on patch set 1 CR +1 03/27/23, 10:12

  10. Benni Mack commented on patch set 1 03/27/23, 10:51

    EnrichPasswordValidationContextDataEvent.php:50 Reply

    I would rather have a string than a class name here, just like a "Context" string with "persistence" and "user-settings" or "password-recovery".
  11. Benni Mack voted on patch set 1 V +1 03/27/23, 18:56

  12. Georg Ringer commented on patch set 1 03/27/23, 19:05

    PasswordReset.php:283 Unresolved

    why not just hand over the full row instead of a manually picked number of fields?
  13. Oliver Hader voted on patch set 1 CR +2 03/27/23, 19:12

  14. Oliver Hader voted on patch set 1 V +2 03/27/23, 19:12

  15. Oliver Hader merged patch set 2 03/27/23, 19:13