diff --git a/package.json b/package.json index 5beced05..83ce8157 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.7-p", + "version": "0.2.7-s", "keywords": [ "Remote Management", "Intel AMT", @@ -42,10 +42,12 @@ "nedb": "^1.8.0", "node-forge": "^0.7.6", "otplib": "^10.0.1", + "u2f": "^0.1.3", "util.promisify": "^1.0.0", "ws": "^6.1.2", "xmldom": "^0.1.27", - "yauzl": "^2.10.0" + "yauzl": "^2.10.0", + "yubikeyotp": "^0.2.0" }, "devDependencies": {}, "repository": { diff --git a/webserver.js b/webserver.js index f8addf87..4d3a4181 100644 --- a/webserver.js +++ b/webserver.js @@ -377,7 +377,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } // Check OTP hardware key - if (domain.yubikey.id && domain.yubikey.secret && user.otphkeys && (user.otphkeys.length > 0) && (typeof (token) == 'string') && (token.length == 44)) { + if ((domain.yubikey != null) && (domain.yubikey.id != null) && (domain.yubikey.secret != null) && (user.otphkeys != null) && (user.otphkeys.length > 0) && (typeof (token) == 'string') && (token.length == 44)) { var keyId = token.substring(0, 12); // Find a matching OPT key