mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed user IP address filtering.
This commit is contained in:
parent
86f02ab73e
commit
66c64268ac
41 changed files with 14 additions and 42 deletions
|
@ -1965,7 +1965,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
ws._socket.pause();
|
||||
|
||||
// Check IP filtering and domain
|
||||
var domain = checkUserIpAddress(ws, req);
|
||||
var domain = null;
|
||||
if (noAuthOk == true) { domain = getDomain(req); } else { domain = checkUserIpAddress(ws, req); } // If auth is required, enforce IP address filtering.
|
||||
if (domain == null) { try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth' })); ws.close(); return; } catch (e) { return; } }
|
||||
|
||||
// A web socket session can be authenticated in many ways (Default user, session, user/pass and cookie). Check authentication here.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue