Return success on sendPasswordResetEmail even if email not found.
This commit is contained in:
@@ -357,10 +357,11 @@ export class UsersRouter extends ClassesRouter {
|
|||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
if (err.code === Parse.Error.OBJECT_NOT_FOUND) {
|
if (err.code === Parse.Error.OBJECT_NOT_FOUND) {
|
||||||
throw new Parse.Error(
|
// Return success so that this endpoint can't
|
||||||
Parse.Error.EMAIL_NOT_FOUND,
|
// be used to enumerate valid emails
|
||||||
`No user found with email ${email}.`
|
return Promise.resolve({
|
||||||
);
|
response: {},
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user