mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 15:03:20 -05:00
Fixed server crash in login request.
This commit is contained in:
parent
48f78aa6ca
commit
94662c9b77
@ -1933,7 +1933,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
if (hardwareKeyChallenge) { hwstate = obj.parent.encodeCookie({ u: req.session.tokenusername, p: req.session.tokenpassword, c: req.session.u2fchallenge }, obj.parent.loginCookieEncryptionKey) }
|
||||
|
||||
// Check if we can use OTP tokens with email
|
||||
var otpemail = (parent.mailserver != null) && (req.session.tokenemail);
|
||||
var otpemail = (parent.mailserver != null) && (req.session != null) && (req.session.tokenemail != null);
|
||||
if ((typeof domain.passwordrequirements == 'object') && (domain.passwordrequirements.email2factor == false)) { otpemail = false; }
|
||||
|
||||
// Render the login page
|
||||
|
Loading…
Reference in New Issue
Block a user