diff options
author | Ade Lee <alee@redhat.com> | 2012-07-17 10:38:05 -0400 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2012-07-17 10:51:19 -0400 |
commit | b46d51b4267e20e2e923bd48a210af357887f993 (patch) | |
tree | a11613cdd8125b9c613bd88f76a9937fe1d90dc4 /base/common | |
parent | 15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd (diff) | |
download | pki-b46d51b4267e20e2e923bd48a210af357887f993.tar.gz pki-b46d51b4267e20e2e923bd48a210af357887f993.tar.xz pki-b46d51b4267e20e2e923bd48a210af357887f993.zip |
Additional checks to avoid null pointers in Installation servlet
Diffstat (limited to 'base/common')
-rw-r--r-- | base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigurationResourceService.java | 6 |
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)) { |