If password is undefined, test password returns false
This commit is contained in:
parent
9860afd498
commit
fabbae223e
|
@ -185,7 +185,7 @@ module.exports.PasswordField = class extends module.exports.BaseField {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.PasswordField.testSync = function(password, hash) {
|
module.exports.PasswordField.testSync = function(password, hash) {
|
||||||
return bc.compareSync(password, hash);
|
return password === undefined ? false : bc.compareSync(password, hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue