1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added option to remove guest sharing links.

This commit is contained in:
Ylian Saint-Hilaire 2021-01-20 00:26:53 -08:00
parent 67fb1081b0
commit ceedd0c756
7 changed files with 12 additions and 4 deletions

View file

@ -3033,6 +3033,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
const domain = getDomain(req, res);
if (domain == null) { return; }
if (req.query.c == null) { res.sendStatus(404); return; }
if (domain.guestdevicesharing === false) { res.sendStatus(404); return; } // This feature is not allowed.
// Check the inbound desktop sharing cookie
var c = obj.parent.decodeCookie(req.query.c, obj.parent.invitationLinkEncryptionKey, 60); // 60 minute timeout
@ -3071,6 +3072,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
const domain = getDomain(req, res);
if (domain == null) { return; }
if (req.query.c == null) { res.sendStatus(404); return; }
if (domain.guestdevicesharing === false) { res.sendStatus(404); return; } // This feature is not allowed.
// Check the inbound desktop sharing cookie
var c = obj.parent.decodeCookie(req.query.c, obj.parent.invitationLinkEncryptionKey, 60); // 60 minute timeout