mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-09-11 08:55:32 +03:00
maybe fix weird undefined user login accepted #5870
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
b4361d1c4e
commit
aa87fd61bb
@ -2815,7 +2815,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||||||
obj.authenticate(req.query.user, req.query.pass, domain, function (err, userid, passhint, loginOptions) {
|
obj.authenticate(req.query.user, req.query.pass, domain, function (err, userid, passhint, loginOptions) {
|
||||||
// 2FA is not supported in URL authentication method. If user has 2FA enabled, this login method fails.
|
// 2FA is not supported in URL authentication method. If user has 2FA enabled, this login method fails.
|
||||||
var user = obj.users[userid];
|
var user = obj.users[userid];
|
||||||
if (checkUserOneTimePasswordRequired(domain, user, req, loginOptions) == true) {
|
if ((err == null) && checkUserOneTimePasswordRequired(domain, user, req, loginOptions) == true) {
|
||||||
handleRootRequestEx(req, res, domain, direct);
|
handleRootRequestEx(req, res, domain, direct);
|
||||||
} else if ((userid != null) && (err == null)) {
|
} else if ((userid != null) && (err == null)) {
|
||||||
// Login success
|
// Login success
|
||||||
|
Loading…
Reference in New Issue
Block a user