Fixed guest sharing links recording, #3207

This commit is contained in:
Ylian Saint-Hilaire 2021-10-19 16:00:22 -07:00
parent 38c9f5dbdd
commit 782cf07fca
3 changed files with 2915 additions and 2895 deletions

View File

@ -940,7 +940,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
// Send connection request to agent
if (obj.id == null) { obj.id = ('' + Math.random()).substring(2); }
const rcookie = parent.parent.encodeCookie({ ruserid: user._id, nodeid: node._id }, parent.parent.loginCookieEncryptionKey);
const command = { nodeid: node._id, action: 'msg', type: 'tunnel', userid: user._id, value: '*/' + xdomain + 'meshrelay.ashx?p=' + cookie.p + '&id=' + obj.id + '&rauth=' + rcookie + '&nodeid=' + node._id, soptions: {}, rights: cookie.r, guestname: cookie.gn, consent: cookie.cf, remoteaddr: cleanRemoteAddr(obj.req.clientIp) };
const command = { nodeid: node._id, action: 'msg', type: 'tunnel', userid: user._id, value: '*/' + xdomain + 'meshrelay.ashx?p=' + obj.req.query.p + '&id=' + obj.id + '&rauth=' + rcookie + '&nodeid=' + node._id, soptions: {}, rights: cookie.r, guestname: cookie.gn, consent: cookie.cf, remoteaddr: cleanRemoteAddr(obj.req.clientIp) };
obj.guestname = cookie.gn;
// Limit what this relay connection can do
@ -951,6 +951,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
if (cookie.p & 4) { usages.push(5); usages.push(10); } // Files
command.soptions.usages = usages;
}
if (usages.indexOf(parseInt(obj.req.query.p)) < 0) { console.log('ERR: Invalid protocol usage'); try { obj.close(); } catch (e) { } return; }
if (typeof domain.consentmessages == 'object') {
if (typeof domain.consentmessages.title == 'string') { command.soptions.consentTitle = domain.consentmessages.title; }

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,7 @@
<div class='deskareaicon' title="Toggle View Mode" onclick="toggleAspectRatio(1)">&#8690;</div>
<div class='deskareaicon' title="Rotate Left" onclick="drotate(-1)">&olarr;</div>
<div class='deskareaicon' title="Rotate Right" onclick="drotate(1)">&orarr;</div>
<div id="deskRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px"></div>
<input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR" />
<div id="desktopCustomUiButtons" style="float:left"></div>
</div>