This commit is contained in:
Bryan Roe 2019-09-16 11:12:13 -07:00
commit f14a3dc163
8 changed files with 14 additions and 27 deletions

View File

@ -47,7 +47,7 @@ var amtMeiTmpState = null;
var SMBiosTables = null;
var globalDebugFlags = 0; // 1 = IDER Debug
var pendingAmtConfigActions = 0;
const RCSMessageProtocolVersion = 1; // RCS Message Protocol Version. Needs to be less than or equal to RCS server Message Protocol Version
var RCSMessageProtocolVersion = 1; // RCS Message Protocol Version. Needs to be less than or equal to RCS server Message Protocol Version
// MeshCommander for Firmware (GZIP'ed, Base64) v0.7.8
var Large_IntelAmtWebApp_etag = "zVObfGF4CXPIxvxSUu+3";

View File

@ -47,7 +47,7 @@ var amtMeiTmpState = null;
var SMBiosTables = null;
var globalDebugFlags = 0; // 1 = IDER Debug
var pendingAmtConfigActions = 0;
const RCSMessageProtocolVersion = 1; // RCS Message Protocol Version. Needs to be less than or equal to RCS server Message Protocol Version
var RCSMessageProtocolVersion = 1; // RCS Message Protocol Version. Needs to be less than or equal to RCS server Message Protocol Version
// MeshCommander for Firmware (GZIP'ed, Base64) v0.7.8
var Large_IntelAmtWebApp_etag = "zVObfGF4CXPIxvxSUu+3";

View File

@ -1671,16 +1671,6 @@ function createMeshCore(agent)
break;
}
/*
case 'npm': {
var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['node.exe', '-v']);
child.stdout.str = '';
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.waitExit();
response = 'Response: ' + child.stdout.str;
break;
}
*/
/*
case 'border':
{
if ((args['_'].length == 1) && (args['_'][0] == 'on')) {

View File

@ -1671,16 +1671,6 @@ function createMeshCore(agent)
break;
}
/*
case 'npm': {
var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['node.exe', '-v']);
child.stdout.str = '';
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.waitExit();
response = 'Response: ' + child.stdout.str;
break;
}
*/
/*
case 'border':
{
if ((args['_'].length == 1) && (args['_'][0] == 'on')) {

View File

@ -32,9 +32,11 @@ module.exports.CreateMeshMail = function (parent) {
//function EscapeHtmlBreaks(x) { if (typeof x == "string") return x.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;').replace(/\r/g, '<br />').replace(/\n/g, '').replace(/\t/g, '&nbsp;&nbsp;'); if (typeof x == "boolean") return x; if (typeof x == "number") return x; }
// Setup mail server
var options = { host: parent.config.smtp.host, secure: (parent.config.smtp.tls == true) };
var options = { host: parent.config.smtp.host, secure: (parent.config.smtp.tls == true), tls: { } };
//var options = { host: parent.config.smtp.host, secure: (parent.config.smtp.tls == true), tls: { secureProtocol: 'SSLv23_method', ciphers: 'RSA+AES:!aNULL:!MD5:!DSS', secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_COMPRESSION | constants.SSL_OP_CIPHER_SERVER_PREFERENCE, rejectUnauthorized: false } };
if (parent.config.smtp.port != null) { options.port = parent.config.smtp.port; }
if (parent.config.smtp.tlscertcheck === false) { options.tls.rejectUnauthorized = false; }
if (parent.config.smtp.tlsstrict === true) { options.tls.secureProtocol = 'SSLv23_method'; options.tls.ciphers = 'RSA+AES:!aNULL:!MD5:!DSS'; options.tls.secureOptions = constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_COMPRESSION | constants.SSL_OP_CIPHER_SERVER_PREFERENCE; }
if ((parent.config.smtp.user != null) && (parent.config.smtp.pass != null)) { options.auth = { user: parent.config.smtp.user, pass: parent.config.smtp.pass }; }
obj.smtpServer = nodemailer.createTransport(options);

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.0-v",
"version": "0.4.0-w",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -145,6 +145,11 @@
"host": "smtp.myserver.com",
"port": 25,
"from": "myemail@myserver.com",
"tls": false
"__tls__": "When 'tls' is set to true, TLS is used immidiatly when connecting. For SMTP servers that use TLSSTART, set this to 'false' and TLS will still be used.",
"tls": false,
"___tlscertcheck__": "When set to false, the TLS certificate of the SMTP server is not checked.",
"_tlscertcheck": false,
"__tlsstrict__": "When set to true, TLS cypher setup is more limited, SSLv2 and SSLv3 are not allowed.",
"_tlsstrict": true
}
}

View File

@ -1514,8 +1514,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if ((!obj.args.user) && (obj.args.nousers != true) && (nologout == false)) { logoutcontrol += ' <a href=' + domain.url + 'logout?' + Math.random() + ' style=color:white>Logout</a>'; } // If a default user is in use or no user mode, don't display the logout button
var httpsPort = ((obj.args.aliasport == null) ? obj.args.port : obj.args.aliasport); // Use HTTPS alias port is specified
// Clean up the U2F challenge is needed
//if (req.session.u2fchallenge) { delete req.session.u2fchallenge; };
// Clean up the U2F challenge if needed
if (req.session.u2fchallenge) { delete req.session.u2fchallenge; };
// Fetch the web state
parent.debug('web', 'handleRootRequestEx: success.');