From 254700ecea918547220904d095ae02415680a717 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 19 Feb 2014 17:07:22 +0100 Subject: add lib to local maven repo --- .../iaik/iaik_pki_module/1.0/iaik_pki_module-1.0.jar | Bin 0 -> 462362 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 repository/iaik/iaik_pki_module/1.0/iaik_pki_module-1.0.jar diff --git a/repository/iaik/iaik_pki_module/1.0/iaik_pki_module-1.0.jar b/repository/iaik/iaik_pki_module/1.0/iaik_pki_module-1.0.jar new file mode 100644 index 000000000..43c882876 Binary files /dev/null and b/repository/iaik/iaik_pki_module/1.0/iaik_pki_module-1.0.jar differ -- cgit v1.2.3 From 86306b3ddfe33fd4fc7fde85b44add472729914e Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 20 Feb 2014 14:48:53 +0100 Subject: Bugfix: NullPointerException if no PEPS is configured --- .../validation/moaconfig/StorkConfigValidator.java | 59 ++++++++++++---------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java index 318b3b3e7..d8b0ac6de 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java @@ -22,37 +22,40 @@ public class StorkConfigValidator { log.debug("Validate general STORK configuration"); // check peps list - for(CPEPS current : form.getCpepslist()) { - // check country code - String check = current.getCountryCode(); - if (MiscUtil.isNotEmpty(check)) { - if (ValidationHelper.containsPotentialCSSCharacter(check, false)) { - log.warn("CPEPS config countrycode contains potentail XSS characters: " + check); - errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.cc", - new Object[] {ValidationHelper.getPotentialCSSCharacter(false)} )); - } - if(!check.toLowerCase().matches("^[a-z][a-z]$")) { - log.warn("CPEPS config countrycode does not comply to ISO 3166-2 : " + check); + + if (form.getCpepslist() != null) { + for(CPEPS current : form.getCpepslist()) { + // check country code + String check = current.getCountryCode(); + if (MiscUtil.isNotEmpty(check)) { + if (ValidationHelper.containsPotentialCSSCharacter(check, false)) { + log.warn("CPEPS config countrycode contains potentail XSS characters: " + check); errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.cc", - new Object[] {check} )); + new Object[] {ValidationHelper.getPotentialCSSCharacter(false)} )); + } + if(!check.toLowerCase().matches("^[a-z][a-z]$")) { + log.warn("CPEPS config countrycode does not comply to ISO 3166-2 : " + check); + errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.cc", + new Object[] {check} )); + } + } else { + log.warn("CPEPS config countrycode is empty : " + check); + errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.empty", + new Object[] {check} )); } - } else { - log.warn("CPEPS config countrycode is empty : " + check); - errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.empty", - new Object[] {check} )); - } - - // check url - check = current.getURL(); - if (MiscUtil.isNotEmpty(check)) { - if (!ValidationHelper.validateURL(check)) { - log.info("CPEPS config URL is invalid : " + check); - errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.url")); + + // check url + check = current.getURL(); + if (MiscUtil.isNotEmpty(check)) { + if (!ValidationHelper.validateURL(check)) { + log.info("CPEPS config URL is invalid : " + check); + errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.url")); + } + } else { + log.warn("CPEPS config url is empty : " + check); + errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.empty", + new Object[] {check} )); } - } else { - log.warn("CPEPS config url is empty : " + check); - errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.empty", - new Object[] {check} )); } } -- cgit v1.2.3