force user has password in database

This commit is contained in:
ohdarling88 2020-02-03 17:50:25 +08:00
parent aa5632c8a0
commit f66e2a51f9
1 changed files with 1 additions and 1 deletions

View File

@ -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 {