Skip to content

Remove username from password reset / email verification links #7137

Closed
@mtrezza

Description

@mtrezza

New Feature / Enhancement Checklist

Current Limitation

The link sent in emails to reset the password / verify the email address currently contains the username which

  • allows to fully compromise an account if the link is shared
  • may expose personally identifiable information in the logs

Feature / Enhancement Description

Link should not contain email address of user.

The link already contains the perishable token. The token is enough to identify the user whose password should be reset. The user controller should accept the password reset with just the token. It should not make it less secure, as the link already contains both (username and token) and once the link is exposed as it currently is, the password can be reset.

⚠️ It can be argued that the username should never be included in a password reset email together with the token, because it allows to fully compromise an account if the link is shared. If instead only the token is included, and the password reset page does not show the username, even if the link is shared, a malicious user could reset the password, but would not know for which account. So the account cannot be compromised, it would only lock out the real user from their account. Which can be self-resolved by requesting a password reset.

Example Use Case

  1. Sign-up user with email and password where username is the email address
  2. Request password reset for user
  3. Link contains email address of user

Alternatives / Workarounds

  • Hash the email address in the link and compare it to the username as a second measure of security. However, as the link already contains token and email address, this would be stricter than the current security measure and there seems to be no basis for tightening this.

3rd Party References

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    block:majorNeeds to be resolved before next major release; remove label afterwardsstate:released-alphaReleased as alpha versiontype:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions