mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
fix: email enumeration via forgot password page (#4299)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
This commit is contained in:
committed by
GitHub
parent
1f1563401d
commit
8c1f8bfb42
@@ -11,11 +11,10 @@ export const POST = async (request: Request) => {
|
||||
},
|
||||
});
|
||||
|
||||
if (!foundUser) {
|
||||
return Response.json({ error: "No user with this email found" }, { status: 409 });
|
||||
if (foundUser) {
|
||||
await sendForgotPasswordEmail(foundUser, foundUser.locale);
|
||||
}
|
||||
|
||||
await sendForgotPasswordEmail(foundUser, foundUser.locale);
|
||||
return Response.json({});
|
||||
} catch (e) {
|
||||
return Response.json(
|
||||
|
||||
Reference in New Issue
Block a user