diff --git a/apps/meteor/app/lib/server/lib/loginErrorMessageOverride.js b/apps/meteor/app/lib/server/lib/loginErrorMessageOverride.js index 4e054b81b2cf..d45fa0c16b98 100644 --- a/apps/meteor/app/lib/server/lib/loginErrorMessageOverride.js +++ b/apps/meteor/app/lib/server/lib/loginErrorMessageOverride.js @@ -1,14 +1,16 @@ // Do not disclose if user exists when password is invalid import { Accounts } from 'meteor/accounts-base'; -import { Meteor } from 'meteor/meteor'; +// import { Meteor } from 'meteor/meteor'; -const { _runLoginHandlers } = Accounts; -Accounts._runLoginHandlers = function (methodInvocation, options) { - const result = _runLoginHandlers.call(Accounts, methodInvocation, options); +// const { _runLoginHandlers } = Accounts; - if (result.error && result.error.reason === 'Incorrect password') { - result.error = new Meteor.Error(403, 'User not found'); - } +Accounts._options.ambiguousErrorMessages = false; +// Accounts._runLoginHandlers = async function (methodInvocation, options) { +// const result = await _runLoginHandlers.call(Accounts, methodInvocation, options); - return result; -}; +// // if (result.error && result.error.reason === 'Incorrect password') { +// // result.error = new Meteor.Error(403, 'User not found'); +// // } + +// return result; +// };