Skip to content
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

Don't expose user existence on Forgot Password endpoint #1193

Conversation

DEVTomatoCake
Copy link
Member

This PR makes the server return a HTTP 204 No Content success response when requesting a password reset, regardless of the user existing or not, as long as the captcha (if enabled) was passed.

While this definitively hurts the user experience, it's recommended by OWASP, and even if Big Corp does it like that, they might have other tracking measures or ratelimits to prevent brute-force attacks, or might just be vulnerable as well.

Also removes the "Account disabled/scheduled for deletion" error to prevent timing attacks and instead always sends an email. Those checks (as well as MFA verification!) should be handled after the user (and therefore the access of the user to the email account) was verified.

To my knowledge, there's no Spacebar client with a "Forgot password" button nor a server template to handle password resets.

@DEVTomatoCake DEVTomatoCake changed the title Don't expose user existence Don't expose user existence on Forgot Password endpoint Aug 21, 2024
@MaddyUnderStars MaddyUnderStars merged commit b63f285 into spacebarchat:master Aug 21, 2024
3 checks passed
@DEVTomatoCake DEVTomatoCake deleted the fix/forgot-password-security branch August 22, 2024 03:21
DEVTomatoCake added a commit to DEVTomatoCake/spacebar-server that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants