The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/rocketchat-lib/server/lib/loginErrorMessageOverride.js

11 lines
408 B

// Do not disclose if user exists when password is invalid
const _runLoginHandlers = Accounts._runLoginHandlers;
Accounts._runLoginHandlers = function(methodInvocation, options) {
const result = _runLoginHandlers.call(Accounts, methodInvocation, options);
if (result.error && result.error.reason === 'Incorrect password') {
result.error = new Meteor.Error(403, 'User not found');
}
return result;
};