Fixed to server crash issues.
Ylian Saint-Hilaire committed
Feb 18, 2019 at 19:11 UTC
076a183ae17a642ce306d2f948781d32f8fff79c
3 files changed
+3
-3
meshagent.js
+1
-1
@@ -116,7 +116,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
116
const agentMeshCoreHash = (msg.length == 52) ? msg.substring(4, 52) : null;
117
118
// If the agent indicates this is a custom core, we are done. TODO: Speed up this compare.
119
- if (Buffer.from(agentMeshCoreHash, 'binary').toString('hex') == '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000') {
119
+ if ((agentMeshCoreHash != null) && (Buffer.from(agentMeshCoreHash, 'binary').toString('hex') == '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')) {
120
obj.agentCoreCheck = 0;
121
obj.send(obj.common.ShortToStr(16) + obj.common.ShortToStr(0)); // MeshCommand_CoreOk. Indicates to the agent that the core is ok. Start it if it's not already started.
122
agentCoreIsStable();
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.2.8-s",
3
+ "version": "0.2.8-u",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",
webserver.js
+1
-1
@@ -2196,7 +2196,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2196
// If this domain has configured headers, use them.
2197
// Example headers: { 'Strict-Transport-Security': 'max-age=360000;includeSubDomains' };
2198
// { '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'" };
2199
- if ((domain != null) && (domain.httpheaders != null) && (typeof domain.httpheaders == object)) { res.set(domain.httpheaders); }
2199
+ if ((domain != null) && (domain.httpheaders != null) && (typeof domain.httpheaders == 'object')) { res.set(domain.httpheaders); }
2200
2201
// Detect if this is a file sharing domain, if so, just share files.
2202
if ((domain != null) && (domain.share != null)) {