mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	Remove use of X-Guacamole-Error-Message header, return null rather than throwing exception when config not found.
This commit is contained in:
		| @@ -150,7 +150,6 @@ public abstract class AuthenticatingHttpServlet extends HttpServlet { | ||||
|      * @throws IOException If an error occurs while sending the error. | ||||
|      */ | ||||
|     private void failAuthentication(HttpServletResponse response) throws IOException { | ||||
|         response.setHeader("X-Guacamole-Error-Message", AUTH_ERROR_MESSAGE); | ||||
|         response.sendError(HttpServletResponse.SC_FORBIDDEN); | ||||
|     } | ||||
|      | ||||
|   | ||||
| @@ -176,8 +176,8 @@ public class BasicGuacamoleTunnelServlet extends AuthenticatingHttpServlet { | ||||
|             // Get authorized config | ||||
|             GuacamoleConfiguration config = configs.get(id); | ||||
|             if (config == null) { | ||||
|                 logger.error("Error retrieving authorized configuration id={}.", id); | ||||
|                 throw new GuacamoleException("Unknown configuration ID."); | ||||
|                 logger.error("Configuration id={} not found.", id); | ||||
|                 return null; | ||||
|             } | ||||
|              | ||||
|             logger.info("Successful connection from {} to \"{}\".", request.getRemoteAddr(), id); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user