- 🇩🇪Germany Anybody Porta Westfalica
@greggles perhaps you overlooked the "!" (NOT) in the if?
@cassioalmeida you're still assigned, planning to work on this any further?
- 🇩🇪Germany Anybody Porta Westfalica
Maybe it should be none of both, as it might be a username enumeration attack vector?
See ✨ Add Username Enumeration Attack Prevention Test Active - @cassioalmeida opened merge request.
- Status changed to Active
about 1 year ago 10:29pm 30 October 2023 - 🇩🇪Germany Anybody Porta Westfalica
Thanks @cassioalmeida I added a comment. Generally the implementation LGTM!
Here's the implementation in core:
/** * Sets an error if supplied username has been blocked. */ public function validateName(array &$form, FormStateInterface $form_state) { if (!$form_state->isValueEmpty('name') && user_is_blocked($form_state->getValue('name'))) { // Blocked in user administration. $form_state->setErrorByName('name', $this->t('The username %name has not been activated or is blocked.', ['%name' => $form_state->getValue('name')])); } }
https://api.drupal.org/api/drupal/core%21modules%21user%21src%21Form%21U...
So displaying this message seems fine and not considered an enumeration attack.
- Status changed to Needs work
about 1 year ago 7:04am 31 October 2023 - 🇧🇷Brazil cassioalmeida
Hey, sorry for the delay and thanks for the comment.
I'll work on that later today.
- Status changed to Needs review
about 1 year ago 3:05pm 31 October 2023 - Status changed to Needs work
about 1 year ago 10:13am 1 November 2023 - 🇩🇪Germany Anybody Porta Westfalica
Thanks, left some feedback again. After that I think it would be nice if @Grevil did the final review and merge, as he recently worked a lot in this module.
- Status changed to Needs review
about 1 year ago 3:08pm 1 November 2023 - Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @cassioalmeida! :)
LGTM so far, let @Grevil do the final review.
- 🇧🇷Brazil cassioalmeida
You're welcome!
Just tag me if you need anything else.
- Issue was unassigned.
- Status changed to RTBC
about 1 year ago 10:17am 4 November 2023 - 🇩🇪Germany Anybody Porta Westfalica
@Grevil is out of office for some months, so I've reviewed this again and think it's fine! RTBC!
-
Anybody →
committed 5eeeda6a on 2.x authored by
cassioalmeida →
Issue #3221772 by cassioalmeida, Anybody, Grevil: [2.x] Add a check for...
-
Anybody →
committed 5eeeda6a on 2.x authored by
cassioalmeida →
- Status changed to Fixed
about 1 year ago 3:55pm 9 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.