From b46d51b4267e20e2e923bd48a210af357887f993 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Tue, 17 Jul 2012 10:38:05 -0400 Subject: Additional checks to avoid null pointers in Installation servlet --- .../cms/servlet/csadmin/SystemConfigurationResourceService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'base') 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)) { -- cgit