Skip to content

Commit

Permalink
Use userid instead of username when username is null in authlog, #5870
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Mar 3, 2024
1 parent 27f7648 commit 9e9cd82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webserver.js
Expand Up @@ -1411,7 +1411,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
req.session.userid = userid;
req.session.ip = req.clientIp;
setSessionRandom(req);
obj.parent.authLog('https', 'Accepted password for ' + xusername + ' from ' + req.clientIp + ' port ' + req.connection.remotePort, { useragent: req.headers['user-agent'], sessionid: req.session.x });
obj.parent.authLog('https', 'Accepted password for ' + (xusername ? xusername : userid) + ' from ' + req.clientIp + ' port ' + req.connection.remotePort, { useragent: req.headers['user-agent'], sessionid: req.session.x });

// If a login token was used, add this information and expire time to the session.
if ((loginOptions != null) && (loginOptions.tokenName != null) && (loginOptions.tokenUser != null)) {
Expand Down

0 comments on commit 9e9cd82

Please sign in to comment.