Skip to content

Lost password replaces the password immediately instead of sending a reset link #443

Open

Description

@caseysoftware

sendNewPass() (includes/cleanup_functions.php) sets a new random password as soon as someone submits a matching username and email, and emails it in plain text. (It works again as of c28135bd; before that, the lookup always failed.)

  • Anyone who knows a user's username and email can reset their password at will. They can't take over the account, because the new password goes to the real user, but they can keep locking them out.
  • The form answers differently for known and unknown accounts ("Invalid username or email"), so it can be used to check whether a username/email pair exists.
  • The password travels in an email.

Fix: email a single-use link with an expiring token (store only its hash); the user chooses the new password on that page. Always show the same "if the account exists, we've sent a link" message. Skip SSO-only users (Phase 1).

Part of #458 (Phase 0 of the Identity Layer proposal (#435)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions