aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-02-09 15:33:11 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-02-09 15:33:11 +0100
commita90e70cf7beb2fe596185309b0e9c305af08c045 (patch)
tree36177bdf78b8b4cf8d5be6f3e3b42b17e1e9855d /id/ConfigWebTool/src/main/java/at/gv/egovernment
parentd6f9f64e29d986df48f3c7d8a1bb9df4cb5f7095 (diff)
downloadmoa-id-spss-a90e70cf7beb2fe596185309b0e9c305af08c045.tar.gz
moa-id-spss-a90e70cf7beb2fe596185309b0e9c305af08c045.tar.bz2
moa-id-spss-a90e70cf7beb2fe596185309b0e9c305af08c045.zip
update eIDAS node target validator
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java
index 9cb3ce700..0062beb96 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java
@@ -24,6 +24,8 @@ package at.gv.egovernment.moa.id.configuration.validation.oa;
import java.util.ArrayList;
import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
@@ -76,8 +78,9 @@ public class OATargetConfigValidation {
}
} else if (form.getIdentificationType().equals(Constants.IDENIFICATIONTYPE_EIDAS)) {
- String[] test = check.split("\\+");
- if (test.length < 2) {
+ Pattern pattern = Pattern.compile("[A-Z,a-z]{2}\\+[A-Z,a-z]{2}");
+ Matcher matcher = pattern.matcher(check);
+ if (!matcher.matches()) {
log.info("Not valid eIDAS Target");
errors.add(LanguageHelper.getErrorString("validation.general.identificationnumber.eidas.valid", request));