Skip to content

Commit

Permalink
maybe fix weird undefined user login accepted #5870
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Mar 1, 2024
1 parent b4361d1 commit aa87fd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webserver.js
Expand Up @@ -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) {
// 2FA is not supported in URL authentication method. If user has 2FA enabled, this login method fails.
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);
} else if ((userid != null) && (err == null)) {
// Login success
Expand Down

0 comments on commit aa87fd6

Please sign in to comment.