Fixed guest sharing link valid for only 60 minutes.

Ylian Saint-Hilaire committed Sep 2, 2021 at 13:45 UTC 36b73e13f0f1fca318f75a8573dc84d4181fb5f2
1 file changed +2 -2
webserver.js
+2 -2
@@ -3478,8 +3478,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
3478 if (req.query.c == null) { res.sendStatus(404); return; }
3479 if (domain.guestdevicesharing === false) { res.sendStatus(404); return; } // This feature is not allowed.
3480
3481 - // Check the inbound desktop sharing cookie
3482 - var c = obj.parent.decodeCookie(req.query.c, obj.parent.invitationLinkEncryptionKey, 60); // 60 minute timeout
3481 + // Check the inbound guest sharing cookie
3482 + var c = obj.parent.decodeCookie(req.query.c, obj.parent.invitationLinkEncryptionKey, 9999999999); // Decode cookies with unlimited time.
3483 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; }
3484
3485 // Check the expired time, expire message.