-
-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reset_password API to always return success #5284
Conversation
Theoretically (for security), it would be better if this endpoint returned success regardless of registration state (with undistinguishable timing). The corresponding UI text as is common in other websites would be "If this email address has a registered account, it has been sent a password reset email." Otherwise, as is, we have an email enumeration vulnerability. As in, you can find registered users by calling this endpoint and collecting success responses, which you can then use to target those users specifically using leaked password lists. |
We should also probably just remove the |
Seconding Dessalines on removing the |
Updated this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since errors when sending the email are now ignored, the text shown in lemmy-ui should suggest trying again later if nothing happens
|
||
async fn try_reset_password(email: &str, context: &LemmyContext) -> LemmyResult<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be moved to utils like all the other helper functions. And you should add a function comment that it always returns Ok, and probably link to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a little better to keep the reset_password
and try_reset_password
functions together
You also need to remove the |
No description provided.