Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Genericize invalid username or password message
Browse files Browse the repository at this point in the history
#133
The message given to the user upon an invalid login attempt, for security reasons, should not reveal that the username or password was incorrect.  Rather, a generic message should be displayed when the username or password is incorrect.
  • Loading branch information
macsj200 committed Aug 14, 2014
1 parent 2c319c5 commit aeb0272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/strategies/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ module.exports = function() {
}
if (!user) {
return done(null, false, {
message: 'Unknown user'
message: 'Unknown user or invalid password'
});
}
if (!user.authenticate(password)) {
return done(null, false, {
message: 'Invalid password'
message: 'Unknown user or invalid password'
});
}

return done(null, user);
});
}
));
};
};

0 comments on commit aeb0272

Please sign in to comment.