Fixed account login message, #3954

Ylian Saint-Hilaire committed May 10, 2022 at 17:53 UTC b28c7daf2b3e47380c1854f5fedab4c36c2ab11b
2 files changed +2 -20
views/default-mobile.handlebars
+1 -19
@@ -5121,25 +5121,7 @@
5121
5122 // Process any SSH actions
5123 switch (data.action) {
5124 - case 'sshauth': {
5125 - sshTunnelAuthDialog(data, p13sshConnectEx);
5126 - /*
5127 - var x = '';
5128 - x += addHtmlValue("Authentication", '<select id=dp2authmethod style=width:150px onchange=sshAuthUpdate(event)><option value=1 selected>' + "Username & Password" + '</option><option value=2>' + "Username and Key" + '</option></select>')
5129 - x += addHtmlValue("Username", '<input id=dp2user style=width:150px maxlength=64 autocomplete=off onkeyup=sshAuthUpdate(event) />');
5130 - x += '<div id=d2passauth>';
5131 - x += addHtmlValue("Password", '<input type=password id=dp2pass style=width:150px maxlength=64 autocomplete=off onkeyup=sshAuthUpdate(event) />');
5132 - x += '</div><div id=d2keyauth style=display:none>';
5133 - x += addHtmlValue("Key File", '<input type=file id=dp2key style=width:150px maxlength=64 autocomplete=off onchange=sshAuthUpdate(event) />');
5134 - x += addHtmlValue("Key Password", '<input type=password id=dp2keypass style=width:150px maxlength=64 autocomplete=off onkeyup=sshAuthUpdate(event) />');
5135 - x += '</div>';
5136 - x += '<label><input id=dp2keep type=checkbox>' + "Remember credentials" + '</label>';
5137 - x += '<div id=d2keyauth2 style=font-size:x-small><br />' + "Key file must be in OpenSSH format." + '</div>';
5138 - setDialogMode(2, "Authentication", 11, p13sshConnectEx, x, 'ssh');
5139 - setTimeout(sshAuthUpdate, 50);
5140 - */
5141 - break;
5142 - }
5124 + case 'sshauth': { sshTunnelAuthDialog(data, p13sshConnectEx); break; }
5125 case 'autherror': { p13setConsoleMsg("Authentication Error", 5000); return; }
5126 case 'connectionerror': { p13setConsoleMsg("Connection Error", 5000); return; }
5127 case 'sessionerror': { p13setConsoleMsg("Session expired", 5000); return; }
webserver.js
+1 -1
@@ -1271,7 +1271,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
1271 const targets = ['*', 'server-users', user._id];
1272 if (user.groups) { for (var i in user.groups) { targets.push('server-users:' + i); } }
1273 const ua = getUserAgentInfo(req);
1274 - const loginEvent = { etype: 'user', userid: user._id, username: user.name, account: obj.CloneSafeUser(user), action: 'login', msgid: 107, msgArgs: [req.clientIp, ua.browserStr, ua.osStr], msg: 'Account login', domain: domain.id, ip: req.clientIp, userAgent: req.headers['user-agent'] };
1274 + const loginEvent = { etype: 'user', userid: user._id, username: user.name, account: obj.CloneSafeUser(user), action: 'login', msgid: 107, msgArgs: [req.clientIp, ua.browserStr, ua.osStr], msg: 'Account login from ' + req.clientIp + ', ' + ua.browserStr + ', ' + ua.osStr, domain: domain.id, ip: req.clientIp, userAgent: req.headers['user-agent'] };
1275 if (loginOptions != null) {
1276 if ((loginOptions.tokenName != null) && (loginOptions.tokenUser != null)) { loginEvent.tokenName = loginOptions.tokenName; loginEvent.tokenUser = loginOptions.tokenUser; } // If a login token was used, add it to the event.
1277 if (loginOptions.twoFactorType != null) { loginEvent.twoFactorType = loginOptions.twoFactorType; }