diff --git a/translate/translate.json b/translate/translate.json index 69890059..9b812568 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -46393,4 +46393,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/webserver.js b/webserver.js index 060633a9..8db555b3 100644 --- a/webserver.js +++ b/webserver.js @@ -4526,9 +4526,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { if (req.query.dlcore != null) { // Download mesh core var bin = parent.defaultMeshCores[req.query.dlcore]; - if (bin == null) { try { res.sendStatus(404); } catch (ex) { } return; } + if ((bin == null) || (bin.length < 5)) { try { res.sendStatus(404); } catch (ex) { } return; } setContentDispositionHeader(res, 'application/octet-stream', req.query.dlcore + '.js', null, 'meshcore.js'); - res.send(bin); + res.send(bin.substring(4)); return; }