change response text to avoid reveal user's data (#161)

* change response text to avoid reveal user's data

* include log into forgot password

---------

Co-authored-by: p.souza <p.souza@cognigy.com>
This commit is contained in:
Paulo Tellesandp.souza authored and GitHub committed 2023-05-04 08:39:04 -04:00
1 parent 3997f57365
commit aadb0b15f2
2 files changed
+8 -5

No files matched your search

+2 -2
View File
@@ -453,12 +453,12 @@ router.post('/', async(req, res) => {
if (name) {
logger.debug({payload}, 'user with this username already exists');
return res.status(422).json({msg: 'user with this username already exists'});
return res.status(422).json({msg: 'invalid username or email'});
}
if (email) {
logger.debug({payload}, 'user with this email already exists');
return res.status(422).json({msg: 'user with this email already exists'});
return res.status(422).json({msg: 'invalid username or email'});
}
if (req.user.hasAdminAuth) {