mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-558: Send proper error when unable to connect due to lack of context.
This commit is contained in:
@@ -32,8 +32,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.glyptodon.guacamole.GuacamoleClientException;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.GuacamoleResourceNotFoundException;
|
||||
import org.glyptodon.guacamole.GuacamoleSecurityException;
|
||||
import org.glyptodon.guacamole.GuacamoleUnauthorizedException;
|
||||
import org.glyptodon.guacamole.net.auth.AuthenticationProvider;
|
||||
import org.glyptodon.guacamole.net.auth.Credentials;
|
||||
import org.glyptodon.guacamole.net.auth.UserContext;
|
||||
@@ -331,7 +330,7 @@ public abstract class AuthenticatingHttpServlet extends HttpServlet {
|
||||
|
||||
// If no context, no authorizaton present
|
||||
if (context == null)
|
||||
throw new GuacamoleSecurityException("Not authenticated");
|
||||
throw new GuacamoleUnauthorizedException("Not authenticated");
|
||||
|
||||
// Allow servlet to run now that authentication has been validated
|
||||
authenticatedService(context, request, response);
|
||||
|
Reference in New Issue
Block a user