mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Removed auth cookie on control.ashx websocket connect.
This commit is contained in:
parent
f71c326231
commit
417598fccc
3 changed files with 3 additions and 6 deletions
|
@ -23,10 +23,7 @@ var MeshServerCreateControl = function (domain, authCookie) {
|
|||
if (obj.connectstate != 0) return;
|
||||
obj.connectstate = 0;
|
||||
var url = window.location.protocol.replace('http', 'ws') + '//' + window.location.host + domain + 'control.ashx' + (urlargs.key ? ('?key=' + urlargs.key) : '');
|
||||
if (obj.authCookie && (obj.authCookie != '')) {
|
||||
url += '?moreargs=1'
|
||||
//url += '?auth=' + obj.authCookie;
|
||||
}
|
||||
if (obj.authCookie && (obj.authCookie != '')) { url += '?moreargs=1' }
|
||||
obj.socket = new WebSocket(url);
|
||||
obj.socket.onopen = function (e) { obj.connectstate = 1; if (obj.authCookie && (obj.authCookie != '')) { obj.send({ 'action': 'urlargs', 'args': { 'auth': obj.authCookie } }); } }
|
||||
obj.socket.onmessage = obj.xxOnMessage;
|
||||
|
|
|
@ -1284,7 +1284,7 @@
|
|||
document.onclick = function (e) { if ((xxdialogMode == 999) && (e.target.id != 'topMenuIcon')) { QV('topMenu', false); xxdialogMode = 0; } }
|
||||
|
||||
// Connect to the mesh server
|
||||
meshserver = MeshServerCreateControl(domainUrl, authCookie);
|
||||
meshserver = MeshServerCreateControl(domainUrl);
|
||||
meshserver.onStateChanged = onStateChanged;
|
||||
meshserver.onMessage = onMessage;
|
||||
meshserver.trace = args.trace;
|
||||
|
|
|
@ -1513,7 +1513,7 @@
|
|||
setTimeout(function() { mainUpdate(512); }, 200);
|
||||
|
||||
// Connect to the mesh server
|
||||
meshserver = MeshServerCreateControl(domainUrl, authCookie);
|
||||
meshserver = MeshServerCreateControl(domainUrl);
|
||||
meshserver.onStateChanged = onStateChanged;
|
||||
meshserver.onMessage = onMessage;
|
||||
meshserver.trace = args.trace;
|
||||
|
|
Loading…
Reference in a new issue