From 768df751f36ffce735cf974f75a4677545980bc2 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 27 Oct 2020 14:11:10 -0700 Subject: [PATCH] Fixed server crash on file download. --- meshdevicefile.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshdevicefile.js b/meshdevicefile.js index fe2e4bfa..b12b89a5 100644 --- a/meshdevicefile.js +++ b/meshdevicefile.js @@ -203,7 +203,7 @@ module.exports.CreateMeshDeviceFile = function (parent, ws, res, req, domain, us try { cmd = JSON.parse(data); } catch (ex) { } if ((cmd == null) || (typeof cmd.op == 'string')) { if (cmd.op == 'ok') { - setContentDispositionHeader(this.res, 'application/octet-stream', filename, cmd.size, 'file.bin'); + setContentDispositionHeader(this.res, 'application/octet-stream', this.file, cmd.size, 'file.bin'); } else { try { this.res.sendStatus(401); } catch (ex) { } } diff --git a/package.json b/package.json index 7c912daa..3589a882 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.6.67", + "version": "0.6.68", "keywords": [ "Remote Device Management", "Remote Device Monitoring",