If password is undefined, test password returns false

This commit is contained in:
Thomas Forgione 2017-10-03 11:07:14 +02:00
parent 9860afd498
commit fabbae223e
No known key found for this signature in database
GPG Key ID: C75CD416BD1FFCE1
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ module.exports.PasswordField = class extends module.exports.BaseField {
}
module.exports.PasswordField.testSync = function(password, hash) {
return bc.compareSync(password, hash);
return password === undefined ? false : bc.compareSync(password, hash);
}