To add a new computer to mesh " + EscapeHtml(mesh.name) + ", download the mesh agent and configuration file and install the agent on the computer to manage.
";
x += "
";
// Linux agent install
@@ -2491,7 +2522,9 @@
// Attribute: Mesh Agent Tag
if ((node.agent != null) && (node.agent.tag != null)) {
- x += addDeviceAttribute('Agent Tag', node.agent.tag);
+ var tag = EscapeHtml(node.agent.tag);
+ if (tag.startsWith('mailto:')) { tag = '
' + tag.substring(7) + ''; }
+ x += addDeviceAttribute('Agent Tag', tag);
}
// Attribute: Intel AMT
@@ -3664,7 +3697,6 @@
if (e.keyCode == 13 && consoleFocus == 0) { p15consoleSend(e); processed = 1; }
else if (e.keyCode == 8 && consoleFocus == 0) { var x = box.value; box.value = x.substring(0, x.length - 1); processed = 1; }
else if (e.keyCode == 27) { box.value = ''; processed = 1; }
- else if (e.key.length === 1 && consoleFocus == 0) { box.value = ((box.value + e.key)); processed = 1; }
else if ((e.keyCode == 38) || (e.keyCode == 40)) { // Arrow up || Arrow down
var hindex = consoleHistory.indexOf(box.value);
//console.log(hindex, consoleHistory);
@@ -3673,12 +3705,27 @@
else if ((e.keyCode == 40) && (hindex == 0)) { box.value = ''; }
processed = 1;
}
+ else if (e.key.length === 1) {
+ //box.value = ((box.value + e.key));
+ insertTextAtCursor(box, e.key);
+ processed = 1;
+ }
} else {
if (e.charCode != 0 && consoleFocus == 0) { box.value = ((box.value + String.fromCharCode(e.charCode))); processed = 1; }
}
if (processed > 0) { return haltEvent(e); }
}
+ // Insert text at the cursor location on the
+ function insertTextAtCursor(ctrl, val) {
+ if (document.selection) { ctrl.focus(); sel = document.selection.createRange(); sel.text = val; }
+ else if (ctrl.selectionStart || ctrl.selectionStart == '0') {
+ var start = ctrl.selectionStart, end = ctrl.selectionEnd;
+ ctrl.value = ctrl.value.substring(0, start) + val + ctrl.value.substring(end, ctrl.value.length);
+ ctrl.setSelectionRange(end + 1, end + 1);
+ } else { ctrl.value += myValue; }
+ }
+
var consoleNode;
function setupConsole() {
// Setup the console
diff --git a/webserver.js b/webserver.js
index 5d6f7223..967b772f 100644
--- a/webserver.js
+++ b/webserver.js
@@ -675,6 +675,8 @@ module.exports.CreateWebServer = function (parent, db, args, secret, certificate
user = obj.users[req.session.userid]
logoutcontrol = 'Welcome ' + user.name + '.';
}
+
+ // Give the web page a list of supported server features
var features = 0;
if (obj.args.wanonly == true) { features += 1; } // WAN-only mode
if (obj.args.lanonly == true) { features += 2; } // LAN-only mode
@@ -682,6 +684,9 @@ module.exports.CreateWebServer = function (parent, db, args, secret, certificate
if (domain.userQuota == -1) { features += 8; } // No server files mode
if (obj.args.tlsoffload == true) { features += 16; } // No mutual-auth CIRA
if ((parent.config != null) && (parent.config.settings != null) && (parent.config.settings.allowframing == true)) { features += 32; } // Allow site within iframe
+ if ((obj.parent.mailserver != null) && (obj.parent.certificates.CommonName != null) && (obj.parent.certificates.CommonName != 'un-configured')) { features += 64; } // Email invites
+
+ // Send the master web application
if ((!obj.args.user) && (obj.args.nousers != true) && (nologout == false)) { logoutcontrol += '
Logout'; } // If a default user is in use or no user mode, don't display the logout button
res.render(obj.path.join(__dirname, 'views/default'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: args.port, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, mpspass: args.mpspass, webcerthash: obj.webCertificateHashBase64, footer: (domain.footer == null) ? '' : domain.footer });
} else {
@@ -1426,7 +1431,7 @@ module.exports.CreateWebServer = function (parent, db, args, secret, certificate
if (xdomain != '') xdomain += "/";
var meshsettings = "MeshName=" + mesh.name + "\r\nMeshType=" + mesh.mtype + "\r\nMeshID=0x" + meshidhex + "\r\nServerID=" + serveridhex + "\r\n";
if (obj.args.lanonly != true) { meshsettings += "MeshServer=ws" + (obj.args.notls ? '' : 's') + "://" + getWebServerName(domain) + ":" + obj.args.port + "/" + xdomain + "agent.ashx\r\n"; } else { meshsettings += "MeshServer=local"; }
-
+ if (req.query.tag != true) { meshsettings += "Tag=" + req.query.tag + "\r\n"; }
res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Type': 'application/octet-stream', 'Content-Disposition': 'attachment; filename=' + argentInfo.rname });
obj.parent.exeHandler.streamExeWithMeshPolicy({ platform: 'win32', sourceFileName: obj.parent.meshAgentBinaries[req.query.id].path, destinationStream: res, msh: meshsettings, peinfo: obj.parent.meshAgentBinaries[req.query.id].pe });
});