Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function passwordRequiresUpdate(password) {
return bcrypt.getRounds(password) !== 11;
}
function(isMatch, waterfallCb) {
if (bcrypt.getRounds(user.password) !== config.login.passwordHashRounds) {
user.password = passwordToCompare;
user.save(function(err, user) {
if (err) {
return waterfallCb(err, isMatch);
}
waterfallCb(null, isMatch);
});
}
else {
waterfallCb(null, isMatch);
}
}
], function(err, isMatch) {