Rolled back two changes to see if it affects 2FA.

This commit is contained in:
Ylian Saint-Hilaire 2019-09-14 17:27:49 -07:00
parent 34c156b932
commit 3887380efa
6 changed files with 12 additions and 17 deletions

View File

@ -1672,15 +1672,11 @@ function createMeshCore(agent)
}
/*
case 'npm': {
var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['-v']);
var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['node.exe', '-v']);
child.stdout.str = '';
child.stdout.on('data', function (chunk) {
sendConsoleText(chunk, sessionid);
//this.str += chunk.toString();
});
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.waitExit();
response = 'Response: ' + child.stdout.str;
//exec('npm -v', function (error, stdout, stderr) { console.log('stdout: ', stdout); });
break;
}
*/

View File

@ -1672,15 +1672,11 @@ function createMeshCore(agent)
}
/*
case 'npm': {
var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['-v']);
var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['node.exe', '-v']);
child.stdout.str = '';
child.stdout.on('data', function (chunk) {
sendConsoleText(chunk, sessionid);
//this.str += chunk.toString();
});
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.waitExit();
response = 'Response: ' + child.stdout.str;
//exec('npm -v', function (error, stdout, stderr) { console.log('stdout: ', stdout); });
break;
}
*/

View File

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

File diff suppressed because one or more lines are too long

View File

@ -4230,7 +4230,7 @@
refreshDeviceEvents();
// Update the web page title
if ((currentNode) && (xxcurrentView >= 10) && (xxcurrentView < 20)) { document.title = decodeURIComponent("{{{extitle}}}") + ' - ' + currentNode.name; } else { document.title = decodeURIComponent("{{{extitle}}}"); }
if ((currentNode) && (xxcurrentView >= 10) && (xxcurrentView < 20)) { document.title = decodeURIComponent("{{{extitle}}}") + ' - ' + currentNode.name + ' - ' + mesh.name; } else { document.title = decodeURIComponent("{{{extitle}}}"); }
// Clear user consent status if present
p11clearConsoleMsg();

View File

@ -1515,7 +1515,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
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; };
//if (req.session.u2fchallenge) { delete req.session.u2fchallenge; };
// Fetch the web state
parent.debug('web', 'handleRootRequestEx: success.');
@ -3160,7 +3160,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// { 'Referrer-Policy': 'no-referrer', 'x-frame-options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Security-Policy': "default-src http: ws: data: 'self';script-src http: 'unsafe-inline';style-src http: 'unsafe-inline'" };
if ((domain != null) && (domain.httpheaders != null) && (typeof domain.httpheaders == 'object')) {
res.set(domain.httpheaders);
} else {
}
/*
else {
// Use default security headers
res.set({
"X-Frame-Options": "sameorigin",
@ -3170,6 +3172,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
"Content-Security-Policy": "default-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; frame-src 'self'; media-src 'self'"
});
}
*/
// Check the session if bound to the external IP address
if ((req.session.ip != null) && (req.session.ip == cleanRemoteAddr(req.ip))) { req.session = {}; }