mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Guest sharing fixes.
This commit is contained in:
parent
ac6c4ba1bc
commit
902e71a96f
3 changed files with 18 additions and 3 deletions
|
@ -3490,6 +3490,10 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
// This is the new style sharing cookie, just encodes the pointer to the sharing information in the database.
|
||||
// Gives a much more compact URL.
|
||||
if (typeof c.pid != 'string') { res.sendStatus(404); return; }
|
||||
|
||||
// Check the expired time, expire message.
|
||||
if ((c.e != null) && (c.e <= Date.now())) { render(req, res, getRenderPage((domain.sitestyle == 2) ? 'message2' : 'message', req, domain), getRenderArgs({ titleid: 2, msgid: 12, domainurl: encodeURIComponent(domain.url).replace(/'/g, '%27') }, req, domain)); return; }
|
||||
|
||||
obj.db.Get('deviceshare-' + c.pid, function (err, docs) {
|
||||
if ((err != null) || (docs == null) || (docs.length != 1)) { res.sendStatus(404); return; }
|
||||
const doc = docs[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue