Skip to content

Commit

Permalink
Revert "fix(security): Prevent email enumeration" (HeyPuter#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos authored Apr 26, 2024
1 parent a3ec7bb commit 2ee00ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/backend/src/routers/send-pass-recovery-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ router.post('/send-pass-recovery-email', express.json(), body_parser_error_handl
});

// Send response
return res.send({message: `If the email address exists in our database. A recovery email will be sent to <strong>${user.email}</strong>`});
if(req.body.username)
return res.send({message: `Password recovery sent to the email associated with <strong>${user.username}</strong>. Please check your email for instructions on how to reset your password.`});
else
return res.send({message: `Password recovery email sent to <strong>${user.email}</strong>. Please check your email for instructions on how to reset your password.`});

}catch(e){
console.log(e)
Expand All @@ -123,4 +126,4 @@ router.post('/send-pass-recovery-email', express.json(), body_parser_error_handl

})

module.exports = router
module.exports = router

0 comments on commit 2ee00ca

Please sign in to comment.