Reset Password - Do not disclose if user exists

Created on 28 November 2022, almost 2 years ago
Updated 28 January 2023, almost 2 years ago

Problem/Motivation

Do not disclose if the user exists in the database on reset password form.

Steps to reproduce

Having openid_connect module enabled, when trying to reset a password for a registered user with an 'openid connect set own password' permissions set, then we should not show a message '%name is connected to an external authentication system.' which discloses if the user exists in the database or not. We should display a general message: If %email% is a valid account, an email will be sent with instructions to reset your password.

Proposed resolution

_openid_connect_user_pass_form_validate can be removed or show more general message that does not disclose if users exists '$form_state->setErrorByName('name', t('%name is connected to an external authentication system.', ['%name' => $name]));'

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany vesnag

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany vesnag

    The proposed solution is to implement a custom validation process that throws a custom exception. This exception will then be caught and handled by an EventSubscriber.

    An alternative approach could be to implement custom validation and a custom submit handler, similar to the username enumeration prevention module .

    I am working on the exception-throwing approach.

Production build 0.71.5 2024