mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-05-21 17:43:46 -04:00
fix messager recordings/events/downloads
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
ea692073fb
commit
41d9241625
@ -123,6 +123,9 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
||||
// Check if protocol is set in the cookie and if so replace req.query.p but only if its not already set or blank
|
||||
if ((cookie != null) && (typeof cookie.p == 'number') && (obj.req.query.p === undefined || obj.req.query.p === "")) { obj.req.query.p = cookie.p; }
|
||||
|
||||
// Patch Messenger protocol to 200
|
||||
if ((obj.id != null) && (obj.id.startsWith('meshmessenger/') == true)) { obj.req.query.p = 200; }
|
||||
|
||||
// Mesh Rights
|
||||
const MESHRIGHT_EDITMESH = 1;
|
||||
const MESHRIGHT_MANAGEUSERS = 2;
|
||||
@ -512,6 +515,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
||||
if (obj.req.query.p == 1) { msg = 'Started terminal session'; msgid = 14; }
|
||||
else if (obj.req.query.p == 2) { msg = 'Started desktop session'; msgid = 15; }
|
||||
else if (obj.req.query.p == 5) { msg = 'Started file management session'; msgid = 16; }
|
||||
else if (obj.req.query.p == 200) { msg = 'Started messenger session'; msgid = 162; }
|
||||
var event = { etype: 'relay', action: 'relaylog', domain: domain.id, userid: sessionUser._id, username: sessionUser.name, msgid: msgid, msgArgs: [obj.id, obj.peer.req.clientIp, req.clientIp], msg: msg + ' \"' + obj.id + '\" from ' + obj.peer.req.clientIp + ' to ' + req.clientIp, protocol: req.query.p, nodeid: req.query.nodeid };
|
||||
if (obj.guestname) { event.guestname = obj.guestname; } else if (relayinfo.peer1.guestname) { event.guestname = relayinfo.peer1.guestname; } // If this is a sharing session, set the guest name here.
|
||||
parent.parent.DispatchEvent(['*', sessionUser._id], obj, event);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -15356,7 +15356,8 @@
|
||||
158: "Displaying alert box, title=\"{0}\", message=\"{1}\"",
|
||||
159: "Device Powered On",
|
||||
160: "Enabled Duo two-factor authentication",
|
||||
161: "Disabled Duo two-factor authentication"
|
||||
161: "Disabled Duo two-factor authentication",
|
||||
162: "Started messenger session \"{0}\" from {1} to {2}"
|
||||
};
|
||||
|
||||
var eventsShortMessageId = {
|
||||
@ -17484,6 +17485,7 @@
|
||||
if (rec.protocol == 5) { protocolStr = "Files"; }
|
||||
if (rec.protocol == 100) { protocolStr = "Intel® AMT WSMAN"; }
|
||||
if (rec.protocol == 101) { protocolStr = "Intel® AMT Redirection"; }
|
||||
if (rec.protocol == 200) { protocolStr = "Messenger"; }
|
||||
x += addHtmlValue4("Protocol", protocolStr);
|
||||
}
|
||||
x += addHtmlValue4("Status", (rec.present == 1)?"Present on server":"Not on server");
|
||||
|
@ -16510,7 +16510,8 @@
|
||||
158: "Displaying alert box, title=\"{0}\", message=\"{1}\"",
|
||||
159: "Device Powered On",
|
||||
160: "Enabled Duo two-factor authentication",
|
||||
161: "Disabled Duo two-factor authentication"
|
||||
161: "Disabled Duo two-factor authentication",
|
||||
162: "Started messenger session \"{0}\" from {1} to {2}"
|
||||
};
|
||||
|
||||
var eventsShortMessageId = {
|
||||
@ -18749,6 +18750,7 @@
|
||||
if (rec.protocol == 5) { protocolStr = "Files"; }
|
||||
if (rec.protocol == 100) { protocolStr = "Intel® AMT WSMAN"; }
|
||||
if (rec.protocol == 101) { protocolStr = "Intel® AMT Redirection"; }
|
||||
if (rec.protocol == 200) { protocolStr = "Messenger"; }
|
||||
x += addHtmlValue4("Protocol", protocolStr);
|
||||
}
|
||||
x += addHtmlValue4("Status", (rec.present == 1) ? "Present on server" : "Not on server");
|
||||
|
@ -4094,7 +4094,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
if (domain == null) return;
|
||||
|
||||
// Check the query
|
||||
if ((domain.sessionrecording == null) || (req.query.file == null) || (obj.common.IsFilenameValid(req.query.file) !== true) || (req.query.file.endsWith('.mcrec') == false)) { res.sendStatus(401); return; }
|
||||
if ((domain.sessionrecording == null) || (req.query.file == null) || (obj.common.IsFilenameValid(req.query.file) !== true) || (!req.query.file.endsWith('.mcrec') && !req.query.file.endsWith('.txt'))) { res.sendStatus(401); return; }
|
||||
|
||||
// Get the recording path
|
||||
var recordingsPath = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user