Server fixes when agent comes in with unknown agentid.
This commit is contained in:
parent
4f043f7c21
commit
89f37973a0
|
@ -141,7 +141,8 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
}
|
||||
|
||||
// We need to check if the core is current. Figure out what core we need.
|
||||
var corename;
|
||||
var corename = null;
|
||||
if (parent.parent.meshAgentsArchitectureNumbers[obj.agentInfo.agentId] != null) {
|
||||
if (obj.agentCoreCheck == 1001) {
|
||||
// If the user asked, use the recovery core.
|
||||
corename = parent.parent.meshAgentsArchitectureNumbers[obj.agentInfo.agentId].rcore;
|
||||
|
@ -152,6 +153,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
// This is the normal core for this agent type.
|
||||
corename = parent.parent.meshAgentsArchitectureNumbers[obj.agentInfo.agentId].core;
|
||||
}
|
||||
}
|
||||
|
||||
// If we have a core, use it.
|
||||
if (corename != null) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.3.6-o",
|
||||
"version": "0.3.6-p",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
|
|
@ -1721,7 +1721,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
var urlArgs = '', urlName = null, splitUrl = req.originalUrl.split("?");
|
||||
if (splitUrl.length > 1) { urlArgs = '?' + splitUrl[1]; }
|
||||
if ((splitUrl.length > 0) && (splitUrl[0].length > 1)) { urlName = splitUrl[0].substring(1).toLowerCase(); }
|
||||
if ((urlName == null) || (domain.redirects[urlName] == null)) { res.sendStatus(404); return; }
|
||||
if ((urlName == null) || (domain.redirects[urlName] == null) || (urlName[0] == '_')) { res.sendStatus(404); return; }
|
||||
res.redirect(domain.redirects[urlName] + urlArgs + getQueryPortion(req));
|
||||
}
|
||||
|
||||
|
@ -2743,7 +2743,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
obj.app.get(url + 'welcome.jpg', handleWelcomeImageRequest);
|
||||
|
||||
// Server redirects
|
||||
if (parent.config.domains[i].redirects) { for (var j in parent.config.domains[i].redirects) { obj.app.get(url + j, handleDomainRedirect); } }
|
||||
if (parent.config.domains[i].redirects) { for (var j in parent.config.domains[i].redirects) { if (j[0] != '_') { obj.app.get(url + j, handleDomainRedirect); } } }
|
||||
|
||||
// Server picture
|
||||
obj.app.get(url + 'serverpic.ashx', function (req, res) {
|
||||
|
|
Loading…
Reference in New Issue