From 140174ab590ec058e6c57dab60b52acc3d929963 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 30 Sep 2016 09:39:16 +0200 Subject: fix possible IndexOutOfBoundException --- .../moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS/src/main/java') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java index ea8e88278..3522a16fd 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java @@ -135,7 +135,9 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { // load SingleSignOnService Endpoint from configuration, if Metadata contains no information // FIXME convenience function for not standard conform metadata if (MiscUtil.isEmpty(destination)) { - destination = cpeps.getPepsURL().toString().split(";")[1].trim(); + String[] splitString = cpeps.getPepsURL().toString().split(";"); + if (splitString.length > 1) + destination = cpeps.getPepsURL().toString().split(";")[1].trim(); if (MiscUtil.isNotEmpty(destination)) Logger.debug("Use eIDAS node destination URL:" + destination + " from configuration"); -- cgit v1.2.3