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

FIX - Email not found on forgot password #20883

Closed
wants to merge 2 commits into from
Closed

Conversation

hnrqsss
Copy link

@hnrqsss hnrqsss commented Jul 25, 2024

What does it do?

Returns an error when email not found on forgotPassword lifecycle.

Why is it needed?

Because the strapi response when email is finded as the same when it not find

How to test it?

Just send a POST request to /api/auth/forgot-password with a registered user and one not registered user.

Related issue(s)/PR(s)

Let us know if this is related to any issue/pull request

When email is not found strapi returns the same as when it found
Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contributor-docs ❌ Failed (Inspect) Jul 25, 2024 7:46pm

@strapi-cla
Copy link

strapi-cla commented Jul 25, 2024

CLA assistant check
All committers have signed the CLA.

@hnrqsss
Copy link
Author

hnrqsss commented Jul 25, 2024

Describe the technical changes you did.

Returns an error when email not found on forgotPassword lifecycle.

@hnrqsss hnrqsss marked this pull request as ready for review July 25, 2024 19:49
@Ohiekkar
Copy link
Contributor

It is a security feature to always return a consistent message for both existent and non-existent accounts in order to prevent user enumeration attacks.

@derrickmehaffy
Copy link
Member

It is a security feature to always return a consistent message for both existent and non-existent accounts in order to prevent user enumeration attacks.

Completely agree, we won't merge this as it would be a security risk.

Marking as closed

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.

4 participants