Review main Merged

81605[FEATURE] Provide full userdata in password recovery email

Torben Hansen CR +2 V +2 Easy +38 −6 updated 12/03/23, 19:37

Commit message

Currently, the variables `receiverName`, `url` and `validUntil` are
available in the template of the password recovery email. If more
user related data is required in the recovery email, integrators
have to use the PSR-14 event `SendRecoveryEmailEvent` to add
additional variables to the email object.

To simplify customization of the password recovery email for
frontend users, this patch adds the new variable `userData` to
the FluidEmail object, which contains all userdata of the
affected frontend user.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Guido Schmechel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1823

  1. Torben Hansen uploaded patch set 1 10/28/23, 16:42

  2. core-ci voted on patch set 1 V +1 10/28/23, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48330

  3. Oliver Klee voted on patch set 1 CR +1 10/29/23, 13:32

  4. Garvin Hicking commented on patch set 1 10/29/23, 16:53

    Feature-100268-ProvideFullUserdataInPasswordRecoveryEmail.rst:15

    s/has/that has/ s/to password/to the password/ s/variable/array variable/ ?

    RecoveryService.php:102

    Maybe strip "password" at this place, to harden not exposing hashed passwords in possible attack scenarios?
  5. Torben Hansen uploaded patch set 2 CR +1 V +1 10/29/23, 17:16

  6. Torben Hansen commented on patch set 2 10/29/23, 17:19

    Feature-100268-ProvideFullUserdataInPasswordRecoveryEmail.rst:15 Reply

    Done

    RecoveryService.php:102 Reply

    Unsure if it is possible to construct a valid attack scenario here, but I removed the hash from the `userData` array now, since it is useless in the fluid template anyway.
  7. core-ci voted on patch set 2 V +1 10/29/23, 17:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48338

  8. Garvin Hicking commented on patch set 2 V +1 CR +1 10/29/23, 17:44

    Thanks for the patch, this definitely eases up sending these mails, if customization is needed.

    Feature-100268-ProvideFullUserdataInPasswordRecoveryEmail.rst:16

    Oh well, I'm sorry, my addition only made partial sense. Here's another approach: A new array variable :php:`{userData}` has been added to the password recovery FluidEmail object. It contains the values of all fields belonging to the affected frontend user.

    RecoveryServiceTest.php:82

    Minor gripe - the other key pairs are indented to align with each other, maybe the spaces could be added here too 🫣
  9. Benni Mack commented on patch set 2 10/31/23, 11:07

    FrontendUserRepository.php:128

    let's just unset password for the sake of being at least a little bit concerned.
  10. Torben Hansen commented on patch set 2 10/31/23, 11:14

    FrontendUserRepository.php:128 Reply

    This password is unset in RecoveryService, but I will update the patch the unset the password in FrontendUserRepository (if user is found)
  11. Torben Hansen uploaded patch set 3 CR +1 V +1 10/31/23, 11:36

  12. Torben Hansen uploaded patch set 4 10/31/23, 11:38

  13. Torben Hansen commented on patch set 4 10/31/23, 11:39

    Feature-100268-ProvideFullUserdataInPasswordRecoveryEmail.rst:16 Reply

    Done

    FrontendUserRepository.php:128 Reply

    Done

    RecoveryServiceTest.php:82 Reply

    Done
  14. Garvin Hicking voted on patch set 4 V +1 CR +1 10/31/23, 11:43

  15. core-ci voted on patch set 3 V +1 10/31/23, 11:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48398

  16. core-ci voted on patch set 4 V +1 10/31/23, 11:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48399

  17. Oliver Klee voted on patch set 4 CR +1 10/31/23, 11:53

  18. Torben Hansen rebased onto patch set 5 CR +1 V +1 12/02/23, 14:08

  19. core-ci voted on patch set 5 V +1 12/02/23, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50250

  20. Garvin Hicking voted on patch set 5 CR +1 V +1 12/02/23, 14:57

  21. Guido Schmechel voted on patch set 5 CR +1 12/03/23, 12:26

  22. Benni Mack voted on patch set 5 CR +2 V +2 12/03/23, 19:37

  23. Benni Mack merged patch set 6 12/03/23, 19:37