Review main Merged

62482[TASK] Expose none existing user in forgot password dialog

Jan Stockfisch CR +2 V +2 Easy +28 −3 updated 12/11/19, 04:38

Commit message

Shows error flash message while
`exposeNonexistentUserInForgotPasswordDialog` is set to `1`

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Alexander Schnitzler +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Alexander Schnitzler +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 2741

Show 816 earlier messages
  1. Jan Stockfisch uploaded patch set 1 11/29/19, 11:20

  2. Jan Stockfisch updated the commit message in patch set 2 11/29/19, 11:31

  3. Jan Stockfisch updated the commit message in patch set 3 11/29/19, 11:35

  4. TYPO3com voted on patch set 1 V +1 11/29/19, 11:39 Completed build in 14m 02s on Fri, 29 Nov, 11:39 AM Test Summary: 48377 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38928

  5. TYPO3com voted on patch set 2 V -1 11/29/19, 11:41 Completed build in 09m 49s on Fri, 29 Nov, 11:41 AM Test Summary: 1 of 48719 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38929

  6. TYPO3com voted on patch set 3 V -1 11/29/19, 11:47 Completed build in 10m 26s on Fri, 29 Nov, 11:47 AM Test Summary: 25 of 34778 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38931

  7. TYPO3com commented on patch set 3 11/29/19, 11:58 Completed build in 32m 04s on Fri, 29 Nov, 11:58 AM Test Summary: 59 of 47692 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38931

  8. TYPO3com voted on patch set 3 V +1 11/29/19, 12:10 Completed build in 43m 38s on Fri, 29 Nov, 12:10 PM Test Summary: 48375 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38931

  9. TYPO3com voted on patch set 2 V +1 11/29/19, 12:15 Completed build in 53m 30s on Fri, 29 Nov, 12:15 PM Test Summary: 48373 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38929

  10. Jan Stockfisch rebased onto patch set 4 12/08/19, 09:52

  11. Jan Stockfisch uploaded patch set 5 12/08/19, 09:56

  12. TYPO3com voted on patch set 4 V -1 12/08/19, 10:01 Completed build in 08m 41s on Sun, 8 Dec, 10:01 AM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39260

  13. TYPO3com voted on patch set 5 V +1 12/08/19, 10:05 Completed build in 09m 25s on Sun, 8 Dec, 10:05 AM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39261

  14. Alexander Schnitzler commented on patch set 5 12/08/19, 11:09

    PasswordRecoveryController.php:94

    Why is this flash message of type "error" when the username is exposed and of type "ok" if not? Doesn't seem to be consistent.
  15. Jan Stockfisch commented on patch set 5 12/08/19, 11:52

    ck

    PasswordRecoveryController.php:94 Reply

    if there is no email address found, we cannot send an email. while the expose flag is set, we have to inform the user of this error, that we were unable sent the email. if the flag is inactive we need to behave like everything went as the user expected, even if it didn't.
  16. Alexander Schnitzler commented on patch set 5 12/08/19, 12:20

    PasswordRecoveryController.php:94 Reply

    Alright, got it. Still, I am not happy with the arrangement of code here because we now have two conditions checking if $email is null. I will push a new proposal.
  1. Alexander Schnitzler commented on patch set 5 CR -1 12/08/19, 12:35

    PasswordRecoveryController.php:90

    Last remark: I dislike loose comparisons, especially if we are dealing with typoscript here. At the moment, $this->settings['exposeNonexistentUserInForgotPasswordDialog'] can be pretty much everything that results in true. As this is a security settings I would double check this setting and maybe only allow a 1(int), 1(string) and or true(string). At the moment, $this->settings['exposeNonexistentUserInForgotPasswordDialog'] being "false" (mind the type here) will evaluate to true. php > var_dump("false" == true); php shell code:1: bool(true)

    PasswordRecoveryController.php:94 Reply

    Nevermind, we'll leave it as is.
  2. Stephan Großberndt updated the commit message in patch set 6 12/08/19, 14:36

  3. Stephan Großberndt updated the commit message in patch set 7 12/08/19, 14:39

  4. TYPO3com voted on patch set 6 V +1 12/08/19, 14:45 Completed build in 08m 35s on Sun, 8 Dec, 02:45 PM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39267

  5. TYPO3com voted on patch set 7 V +1 12/08/19, 14:49 Completed build in 10m 11s on Sun, 8 Dec, 02:49 PM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39268

  6. Jan Stockfisch commented on patch set 7 12/09/19, 08:58

    PasswordRecoveryController.php:90 Reply Unresolved

    fair enough - on it
  7. Jan Stockfisch uploaded patch set 8 12/09/19, 10:17

  8. Jan Stockfisch uploaded patch set 9 12/09/19, 10:25

  9. Alexander Schnitzler commented on patch set 9 CR -1 12/09/19, 10:26

    PasswordRecoveryController.php:321

    Why static?

    PasswordRecoveryController.php:324

    This does possibly trigger a notice. > $this->settings['exposeNonexistentUserInForgotPasswordDialog'] ?? null please.
  10. TYPO3com voted on patch set 8 V +1 12/09/19, 10:41 Completed build in 23m 50s on Mon, 9 Dec, 10:41 AM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39280

  11. TYPO3com voted on patch set 9 V +1 12/09/19, 10:43 Completed build in 09m 14s on Mon, 9 Dec, 10:43 AM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39281

  12. Jan Stockfisch commented on patch set 9 12/09/19, 11:43

    PasswordRecoveryController.php:321 Reply

    Because `$acceptedValues` doesn't change at all, does it? Which is why we don't need php to allocate the memory on every call again.

    PasswordRecoveryController.php:324 Reply

    arg... right... one sec
  13. Jan Stockfisch uploaded patch set 10 12/09/19, 11:45

  14. Jan Stockfisch commented on patch set 10 12/09/19, 11:47

    PasswordRecoveryController.php:324 Reply

    Oh, just used "?? false" here, which results in the same as `?? null`. Is it more consistent to use `?? null` here?
  15. TYPO3com voted on patch set 10 V -1 12/09/19, 11:53 Completed build in 07m 41s on Mon, 9 Dec, 11:53 AM Test Summary: 47762 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39282

  16. Alexander Schnitzler commented on patch set 10 12/09/19, 11:58

    PasswordRecoveryController.php:321 Reply

    It's true but in which scenario do we call this method more than once during one request? The bad thing about static variables is, that they remain in the memory to be accessible during the next call of the method. But as this never happens imo, a static variables only has downsides here.

    PasswordRecoveryController.php:324 Reply

    I don't think there is any difference. We use the ?? to suppress a possible warning, not to verify type safety. As long as the default value evaluates to one that doesn't match the accepted values, it's fine.
  17. Jan Stockfisch uploaded patch set 11 12/09/19, 14:35

  18. Jan Stockfisch commented on patch set 11 12/09/19, 14:36

    PasswordRecoveryController.php:321 Reply

    Ack

    PasswordRecoveryController.php:324 Reply

    I'm more a fan of the `?? null` one
  19. TYPO3com voted on patch set 11 V +1 12/09/19, 14:43 Completed build in 07m 37s on Mon, 9 Dec, 02:43 PM Test Summary: 68708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39286

  20. Alexander Schnitzler voted on patch set 11 V +1 CR +1 12/09/19, 16:05

  21. Georg Ringer commented on patch set 11 12/09/19, 16:18

    can't we name that exposeNone**E**xistentUserInForgotPasswordDialog?
  22. Jan Stockfisch commented on patch set 11 12/10/19, 18:38

    > Patch Set 11: > > can't we name that exposeNone**E**xistentUserInForgotPasswordDialog? I would prefer that very much! Unfortunately this key already exists and it would be breaking to rename it.
  23. Jan Stockfisch commented on patch set 11 12/10/19, 18:50

    > Patch Set 11: > > > Patch Set 11: > > > > can't we name that exposeNone**E**xistentUserInForgotPasswordDialog? > > I would prefer that very much! Unfortunately this key already exists and it would be breaking to rename it. But we could deprecate the old one in the FrontendLoginController and use both for now in the extbase plugin? I am deprecating the entire pibase plugin in a different patch anyway.
  24. Georg Ringer voted on patch set 11 V +2 CR +2 12/11/19, 03:24

  25. Georg Ringer merged patch set 12 12/11/19, 04:38