aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-02-08 10:04:28 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-02-08 10:04:28 +0100
commit10b6016ef4d5830dd157f13f24230c712790d789 (patch)
tree180472c6d14bbeed363104cb6ca39db01e8b2345 /id/server/idserverlib/src/main
parent1dab39c10271ef55d94b6d73955d89abfd48cd8e (diff)
downloadmoa-id-spss-10b6016ef4d5830dd157f13f24230c712790d789.tar.gz
moa-id-spss-10b6016ef4d5830dd157f13f24230c712790d789.tar.bz2
moa-id-spss-10b6016ef4d5830dd157f13f24230c712790d789.zip
fix possible NullPointerException if pendingRequest is not found any more
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/FinalizeAuthenticationTask.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/FinalizeAuthenticationTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/FinalizeAuthenticationTask.java
index 8add03da7..712ebb731 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/FinalizeAuthenticationTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/FinalizeAuthenticationTask.java
@@ -59,6 +59,12 @@ public class FinalizeAuthenticationTask extends AbstractAuthServletTask {
IRequest pendingReq = RequestStorage.getPendingRequest(
(String) executionContext.get("pendingRequestID"));
+ if (pendingReq == null) {
+ Logger.info("No PendingRequest with Id: " + executionContext.get("pendingRequestID") + " Maybe, a transaction timeout occure.");
+ throw new MOAIDException("auth.28", new Object[]{executionContext.get("pendingRequestID")});
+
+ }
+
//get Session from context
String moasessionid = (String) executionContext.get(PARAM_SESSIONID);
AuthenticationSession session = null;