From 76d4bf558e6bdae365399e61624cacbfeff79999 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 2 Mar 2023 12:37:04 +0100 Subject: fix(connector): mitigate possible NullPointerException --- .../specific/modules/auth/eidas/v2/handler/AbstractEidProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/authmodule-eIDAS-v2/src') diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/handler/AbstractEidProcessor.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/handler/AbstractEidProcessor.java index 80348f3d..57b8ab16 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/handler/AbstractEidProcessor.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/handler/AbstractEidProcessor.java @@ -322,8 +322,9 @@ public abstract class AbstractEidProcessor implements INationalEidProcessor { } private void buildNameIdPolicy(Builder authnRequestBuilder, String countryCode) { + String ccSelector = countryCode != null ? "." + countryCode.toLowerCase() : ""; String ccSpecificPolicy = basicConfig.getBasicConfiguration( - Constants.CONFIG_PROP_EIDAS_NODE_NAMEIDFORMAT + "." + countryCode.toLowerCase()); + Constants.CONFIG_PROP_EIDAS_NODE_NAMEIDFORMAT + ccSelector); if (StringUtils.isNotEmpty(ccSpecificPolicy)) { log.debug("Using specific nameIdFormat:{} to request: {}", ccSpecificPolicy, countryCode); -- cgit v1.2.3