aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-10-14 13:55:04 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-10-14 13:55:04 +0200
commite21f6944e484dd24f5f7f2aca7a39b6a25b32539 (patch)
treee9a2a5c670e25b666b1f1bc225d1bbe76ee3da02 /id/ConfigWebTool/src/main/java/at/gv/egovernment
parent550ba6452a44cd93066fc5317de626d21758901b (diff)
downloadmoa-id-spss-e21f6944e484dd24f5f7f2aca7a39b6a25b32539.tar.gz
moa-id-spss-e21f6944e484dd24f5f7f2aca7a39b6a25b32539.tar.bz2
moa-id-spss-e21f6944e484dd24f5f7f2aca7a39b6a25b32539.zip
Bugfix: NullPointer if SAML1 is deactivated and no DB entry exists
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/data/oa/OASAML1Config.java9
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java6
2 files changed, 11 insertions, 4 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java
index 951052877..c4c945bec 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java
@@ -29,8 +29,13 @@ public class OASAML1Config {
provideFullMandateData = saml1.isProvideFullMandatorData();
provideIdentityLink = saml1.isProvideIdentityLink();
provideStammZahl = saml1.isProvideStammzahl();
- useCondition = saml1.isUseCondition();
- conditionLength = saml1.getConditionLength().intValue();
+
+ if (saml1.isUseCondition() != null)
+ useCondition = saml1.isUseCondition();
+
+ if (saml1.getConditionLength() != null)
+ conditionLength = saml1.getConditionLength().intValue();
+
if (saml1.isIsActive() != null)
isActive = saml1.isIsActive();
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 3ee870d11..ca547204f 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -528,7 +528,8 @@ ServletResponseAware {
}
UserDatabase userdb = ConfigurationDBRead.getUserWithID(authUser.getUserID());
- if (!authUser.isAdmin() && !userdb.isIsMailAddressVerified()) {
+ if (!authUser.isAdmin() && userdb.isIsMailAddressVerified() != null &&
+ !userdb.isIsMailAddressVerified()) {
log.info("Online-Applikation managemant disabled. Mail address is not verified.");
addActionError(LanguageHelper.getErrorString("error.editoa.mailverification"));
return Constants.STRUTS_SUCCESS;
@@ -816,13 +817,14 @@ ServletResponseAware {
if (saml1 == null) {
saml1 = new OASAML1();
authoa.setOASAML1(saml1);
+ saml1.setIsActive(false);
}
if (authUser.isAdmin()) {
saml1.setIsActive(saml1OA.isActive());
}
- if (saml1.isIsActive()) {
+ if (saml1.isIsActive() != null && saml1.isIsActive()) {
saml1.setProvideAUTHBlock(saml1OA.isProvideAuthBlock());
saml1.setProvideCertificate(saml1OA.isProvideCertificate());
saml1.setProvideFullMandatorData(saml1OA.isProvideFullMandateData());