mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-26 07:57:56 +03:00
Fixed webserver.js exception.
This commit is contained in:
parent
60701f5b7c
commit
4db8ff3946
14
webserver.js
14
webserver.js
@ -2883,13 +2883,15 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||||||
// Send back the login application
|
// Send back the login application
|
||||||
// If this is a 2 factor auth request, look for a hardware key challenge.
|
// If this is a 2 factor auth request, look for a hardware key challenge.
|
||||||
// Normal login 2 factor request
|
// Normal login 2 factor request
|
||||||
const sec = parent.decryptSessionData(req.session.e);
|
|
||||||
if (req.session && (req.session.loginmode == 4) && (sec.tuserid)) {
|
if (req.session && (req.session.loginmode == 4) && (sec.tuserid)) {
|
||||||
var user = obj.users[sec.tuserid];
|
const sec = parent.decryptSessionData(req.session.e);
|
||||||
if (user != null) {
|
if (sec != null) {
|
||||||
parent.debug('web', 'handleRootRequestEx: sending 2FA challenge.');
|
const user = obj.users[sec.tuserid];
|
||||||
getHardwareKeyChallenge(req, domain, user, function (hwchallenge) { handleRootRequestLogin(req, res, domain, hwchallenge, passRequirements); });
|
if (user != null) {
|
||||||
return;
|
parent.debug('web', 'handleRootRequestEx: sending 2FA challenge.');
|
||||||
|
getHardwareKeyChallenge(req, domain, user, function (hwchallenge) { handleRootRequestLogin(req, res, domain, hwchallenge, passRequirements); });
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Password recovery 2 factor request
|
// Password recovery 2 factor request
|
||||||
|
Loading…
Reference in New Issue
Block a user