From fabbae223e0722a5691354307800866b8a1327c8 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 3 Oct 2017 11:07:14 +0200 Subject: [PATCH] If password is undefined, test password returns false --- utils/model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/model.js b/utils/model.js index b4703d6..aa1ea09 100644 --- a/utils/model.js +++ b/utils/model.js @@ -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); }