From f8b9d30b9c1b25b5e92bbb488394e41dbe8be7f1 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 24 Feb 2016 15:20:22 +0100 Subject: fix bug, which brakes the error handling --- .../at/gv/egovernment/moa/id/auth/servlet/AbstractController.java | 4 ++++ .../moa/id/protocols/AbstractAuthProtocolModulController.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'id') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java index 49035aba3..8567d7834 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java @@ -236,6 +236,8 @@ public abstract class AbstractController extends MOAIDAuthConstants { } + writeHTMLErrorResponse(httpResp, context); + } private void writeHTMLErrorResponse(HttpServletResponse httpResp, Exception error) throws IOException { @@ -250,6 +252,8 @@ public abstract class AbstractController extends MOAIDAuthConstants { context.put("stacktrace", getStacktraceFromException(error)); } + + writeHTMLErrorResponse(httpResp, context); } private void writeHTMLErrorResponse(HttpServletResponse httpResp, VelocityContext context) throws IOException { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java index 0b2fe879a..e6f08abd9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java @@ -207,8 +207,9 @@ public abstract class AbstractAuthProtocolModulController extends AbstractContro try { Class clazz = Class.forName(protocolRequest.requestedModule()); + if (clazz == null || - !clazz.isInstance(IModulInfo.class)) { + !IModulInfo.class.isAssignableFrom(clazz)) { Logger.fatal("Requested protocol module Class is NULL or does not implement the IModulInfo interface."); throw new Exception("Requested protocol module Class is NULL or does not implement the IModulInfo interface."); -- cgit v1.2.3