mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Fixed guest sharing link valid for only 60 minutes.
This commit is contained in:
parent
1ed86c22e2
commit
36b73e13f0
1 changed files with 2 additions and 2 deletions
|
@ -3478,8 +3478,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
if (req.query.c == null) { res.sendStatus(404); return; }
|
if (req.query.c == null) { res.sendStatus(404); return; }
|
||||||
if (domain.guestdevicesharing === false) { res.sendStatus(404); return; } // This feature is not allowed.
|
if (domain.guestdevicesharing === false) { res.sendStatus(404); return; } // This feature is not allowed.
|
||||||
|
|
||||||
// Check the inbound desktop sharing cookie
|
// Check the inbound guest sharing cookie
|
||||||
var c = obj.parent.decodeCookie(req.query.c, obj.parent.invitationLinkEncryptionKey, 60); // 60 minute timeout
|
var c = obj.parent.decodeCookie(req.query.c, obj.parent.invitationLinkEncryptionKey, 9999999999); // Decode cookies with unlimited time.
|
||||||
if ((c == null) || (c.a !== 5) || (typeof c.p !== 'number') || (c.p < 1) || (c.p > 7) || (typeof c.uid != 'string') || (typeof c.nid != 'string') || (typeof c.gn != 'string') || (typeof c.cf != 'number') || (typeof c.pid != 'string')) { res.sendStatus(404); return; }
|
if ((c == null) || (c.a !== 5) || (typeof c.p !== 'number') || (c.p < 1) || (c.p > 7) || (typeof c.uid != 'string') || (typeof c.nid != 'string') || (typeof c.gn != 'string') || (typeof c.cf != 'number') || (typeof c.pid != 'string')) { res.sendStatus(404); return; }
|
||||||
|
|
||||||
// Check the expired time, expire message.
|
// Check the expired time, expire message.
|
||||||
|
|
Loading…
Reference in a new issue