mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fix for server exception when connecting tools.
This commit is contained in:
		
							parent
							
								
									a0680094a8
								
							
						
					
					
						commit
						5e7669e6d8
					
				
					 2 changed files with 1 additions and 1 deletions
				
			
		|  | @ -6262,7 +6262,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { | |||
|                 obj.authenticate(req.query.user, req.query.pass, domain, function (err, userid, passhint, loginOptions) { | ||||
| 
 | ||||
|                     // Check if user as the "notools" site right. If so, deny this connection as tools are not allowed to connect.
 | ||||
|                     if ((user.siteadmin != 0xFFFFFFFF) && (user.siteadmin & SITERIGHT_NOMESHCMD)) { | ||||
|                     if ((user != null) && (user.siteadmin != 0xFFFFFFFF) && (user.siteadmin & SITERIGHT_NOMESHCMD)) { | ||||
|                         // No tools allowed, close the websocket connection
 | ||||
|                         parent.debug('web', 'ERR: Websocket no tools allowed'); | ||||
|                         try { ws.send(JSON.stringify({ action: 'close', cause: 'notools', msg: 'notools' })); ws.close(); } catch (e) { } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue