summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-07-17 10:38:05 -0400
committerAde Lee <alee@redhat.com>2012-07-17 10:51:19 -0400
commitb46d51b4267e20e2e923bd48a210af357887f993 (patch)
treea11613cdd8125b9c613bd88f76a9937fe1d90dc4 /base
parent15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd (diff)
downloadpki-b46d51b4267e20e2e923bd48a210af357887f993.tar.gz
pki-b46d51b4267e20e2e923bd48a210af357887f993.tar.xz
pki-b46d51b4267e20e2e923bd48a210af357887f993.zip
Additional checks to avoid null pointers in Installation servlet
Diffstat (limited to 'base')
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java
index 8481de33a..7c0c14969 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java
@@ -792,7 +792,7 @@ public class SystemConfigurationResourceService extends CMSResourceService imple
throw new CMSException(Response.Status.BAD_REQUEST, "Invalid or no subsystem name provided");
}
- if (data.getIsClone().equals("true")) {
+ if ((data.getIsClone() != null) && (data.getIsClone().equals("true"))) {
String cloneUri = data.getCloneUri();
if (cloneUri == null) {
throw new CMSException(Response.Status.BAD_REQUEST, "Clone selected, but no clone URI provided");
@@ -814,6 +814,8 @@ public class SystemConfigurationResourceService extends CMSResourceService imple
throw new CMSException(Response.Status.BAD_REQUEST, "P12 password not provided");
}
}
+ } else {
+ data.setIsClone("false");
}
String dsHost = data.getDsHost();
@@ -874,6 +876,8 @@ public class SystemConfigurationResourceService extends CMSResourceService imple
if ((data.getBackupPassword() == null) || (data.getBackupPassword().length()<=8)) {
throw new CMSException(Response.Status.BAD_REQUEST, "key backup password must be at least 8 characters");
}
+ } else {
+ data.setBackupKeys("false");
}
if (csType.equals("CA") && (data.getHierarchy() == null)) {