Fixed server crash on file download.

Ylian Saint-Hilaire committed Oct 27, 2020 at 14:11 UTC a318062c7e7acc5ab382eab0ad2de21654dfbb3e
2 files changed +2 -2
meshdevicefile.js
+1 -1
@@ -203,7 +203,7 @@ module.exports.CreateMeshDeviceFile = function (parent, ws, res, req, domain, us
203 try { cmd = JSON.parse(data); } catch (ex) { }
204 if ((cmd == null) || (typeof cmd.op == 'string')) {
205 if (cmd.op == 'ok') {
206 - setContentDispositionHeader(this.res, 'application/octet-stream', filename, cmd.size, 'file.bin');
206 + setContentDispositionHeader(this.res, 'application/octet-stream', this.file, cmd.size, 'file.bin');
207 } else {
208 try { this.res.sendStatus(401); } catch (ex) { }
209 }
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.6.67",
3 + "version": "0.6.68",
4 "keywords": [
5 "Remote Device Management",
6 "Remote Device Monitoring",