always pass strings to bcrypt compare

This commit is contained in:
Barış Soner Uşaklı
2017-04-26 13:17:03 -04:00
parent 085d8c2f92
commit 870bb87b08
2 changed files with 4 additions and 1 deletions

View File

@@ -9,6 +9,9 @@
};
module.compare = function (password, hash, callback) {
if (!hash || !password) {
return setImmediate(callback, null, false);
}
forkChild({ type: 'compare', password: password, hash: hash }, callback);
};