aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-01-15 16:55:45 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-01-15 16:55:45 +0100
commit52cfe0524d896d65254f480bd975554be3f2cb14 (patch)
treec9a363dcc4bb668d0569191b54fc1e7fcaf6e080 /id/ConfigWebTool/src/main
parent539018744865c4b10f689672f11f9ae0ddf65fef (diff)
parent52a855d948a6c3090b5d696774896deac95b621f (diff)
downloadmoa-id-spss-52cfe0524d896d65254f480bd975554be3f2cb14.tar.gz
moa-id-spss-52cfe0524d896d65254f480bd975554be3f2cb14.tar.bz2
moa-id-spss-52cfe0524d896d65254f480bd975554be3f2cb14.zip
Merge branch 'multiple_IDP_publicURLPrefixes' into moa-id-3.0.0-snapshot
Conflicts: id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java
Diffstat (limited to 'id/ConfigWebTool/src/main')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java16
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java13
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_en.properties2
3 files changed, 19 insertions, 12 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
index a658c3f34..36bf0ba7b 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
@@ -58,6 +58,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TimeOuts;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TransformsInfoType;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.VerifyAuthBlock;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.VerifyIdentityLink;
+import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils;
import at.gv.egovernment.moa.id.commons.validation.ValidationHelper;
import at.gv.egovernment.moa.id.configuration.Constants;
import at.gv.egovernment.moa.id.configuration.data.GeneralMOAIDConfig;
@@ -249,12 +250,15 @@ public class EditGeneralConfigAction extends BasicAction {
// oldauthgeneral = oldauth.getGeneralConfiguration();
//set Public URL Prefix
- String pubURLPrefix = moaconfig.getPublicURLPrefix();
- if(pubURLPrefix.endsWith("/")) {
- int length = pubURLPrefix.length();
- pubURLPrefix = pubURLPrefix.substring(0, length-1);
- }
- dbauthgeneral.setPublicURLPreFix(pubURLPrefix);
+ String pubURLPrefix = moaconfig.getPublicURLPrefix();
+ String normalizedPubURLPrefix = KeyValueUtils.normalizeCSVValueString(pubURLPrefix);
+
+// if(pubURLPrefix.endsWith("/")) {
+// int length = pubURLPrefix.length();
+// pubURLPrefix = pubURLPrefix.substring(0, length-1);
+// }
+
+ dbauthgeneral.setPublicURLPreFix(normalizedPubURLPrefix);
// if (MiscUtil.isNotEmpty(moaconfig.getAlternativeSourceID()))
// dbauthgeneral.setAlternativeSourceID(moaconfig.getAlternativeSourceID());
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java
index 95502cedb..bf72e117a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java
@@ -66,14 +66,17 @@ public class MOAConfigValidator {
check = form.getPublicURLPrefix();
if (MiscUtil.isNotEmpty(check)) {
- if (!ValidationHelper.validateURL(check)) {
- log.info("Public URL Prefix is not valid");
- errors.add(LanguageHelper.getErrorString("validation.general.publicURLprefix.valid", request));
- }
+ String[] publicURLPreFix = check.split(",");
+ for (String el : publicURLPreFix) {
+ if (!ValidationHelper.validateURL(el)) {
+ log.info("Public URL Prefix " + el + " is not valid");
+ errors.add(LanguageHelper.getErrorString("validation.general.publicURLprefix.valid", new Object[]{el}, request));
+ }
+ }
} else {
log.info("PublicURL Prefix is empty.");
errors.add(LanguageHelper.getErrorString("validation.general.publicURLprefix.empty", request));
- }
+ }
check = form.getTimeoutAssertion();
if (MiscUtil.isNotEmpty(check)) {
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
index 439b1111e..46f6451dd 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
@@ -384,7 +384,7 @@ validation.edituser.bpk.valid=BPK contains forbidden characters. The following c
validation.general.SAML1SourceID=SAML1SourceID contains forbidden characters. The following characters are not allowed\: {0}
validation.general.publicURLprefix.empty=Public URL Prefix is blank.
-validation.general.publicURLprefix.valid=Public URL Prefix has invalid format.
+validation.general.publicURLprefix.valid=Public URL Prefix {0} has invalid format.
validation.general.certStoreDirectory.empty=CertStoreDirectory is blank.
validation.general.certStoreDirectory.valid=CertStoreDirectory Feld contains forbidden characters. The following characters are not allowed\: {0}
validation.general.Defaultchainigmode.empty=There is no DefaultChainingMode selected.