From f66e2a51f9d7770870a903fc0a31b0004971617f Mon Sep 17 00:00:00 2001 From: ohdarling88 Date: Mon, 3 Feb 2020 17:50:25 +0800 Subject: [PATCH] force user has password in database --- lib/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server.js b/lib/server.js index c0a1596..3161e74 100644 --- a/lib/server.js +++ b/lib/server.js @@ -213,7 +213,7 @@ server.bind(getRootDN(), async (req, res, next) => { const matchedUser = getPersonMatchedDN(reqDN); if (matchedUser) { const record = await getDBRecordForUserId(matchedUser.attributes.uid); - if (validateUserPassword(record.password || '123456', req.credentials)) { + if (record && validateUserPassword(record.password, req.credentials)) { res.end(); return next(); } else {