|
|
eb29d7 |
From 43de35ee65f5097abafb898210e7921a4a7d7665 Mon Sep 17 00:00:00 2001
|
|
|
eb29d7 |
From: Matthew Harmsen <mharmsen@redhat.com>
|
|
|
eb29d7 |
Date: Thu, 13 Nov 2014 14:14:56 -0700
|
|
|
eb29d7 |
Subject: [PATCH] Check for null values in GetConfigEntries
|
|
|
eb29d7 |
|
|
|
eb29d7 |
* Bugzilla Bug #1155654 - Replica install fails when using --setup-ca option
|
|
|
eb29d7 |
(AKA - PKI TRAC Ticket #1142 - NPE in getconfigEntries when internaldb
|
|
|
eb29d7 |
password is removed from master)
|
|
|
eb29d7 |
---
|
|
|
eb29d7 |
.../com/netscape/cms/servlet/csadmin/GetConfigEntries.java | 11 +++++++----
|
|
|
eb29d7 |
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
|
eb29d7 |
|
|
|
eb29d7 |
diff --git a/base/server/cms/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java b/base/server/cms/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
|
|
|
eb29d7 |
index ee013ef..dcb8bdf 100644
|
|
|
eb29d7 |
--- a/base/server/cms/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
|
|
|
eb29d7 |
+++ b/base/server/cms/src/com/netscape/cms/servlet/csadmin/GetConfigEntries.java
|
|
|
eb29d7 |
@@ -180,9 +180,11 @@ public class GetConfigEntries extends CMSServlet {
|
|
|
eb29d7 |
continue;
|
|
|
eb29d7 |
}
|
|
|
eb29d7 |
|
|
|
eb29d7 |
- Node container = xmlObj.createContainer(root, "Config");
|
|
|
eb29d7 |
- xmlObj.addItemToContainer(container, "name", name);
|
|
|
eb29d7 |
- xmlObj.addItemToContainer(container, "value", value);
|
|
|
eb29d7 |
+ if (value != null) {
|
|
|
eb29d7 |
+ Node container = xmlObj.createContainer(root, "Config");
|
|
|
eb29d7 |
+ xmlObj.addItemToContainer(container, "name", name);
|
|
|
eb29d7 |
+ xmlObj.addItemToContainer(container, "value", value);
|
|
|
eb29d7 |
+ }
|
|
|
eb29d7 |
}
|
|
|
eb29d7 |
}
|
|
|
eb29d7 |
|
|
|
eb29d7 |
@@ -192,7 +194,8 @@ public class GetConfigEntries extends CMSServlet {
|
|
|
eb29d7 |
|
|
|
eb29d7 |
outputResult(httpResp, "application/xml", cb);
|
|
|
eb29d7 |
} catch (Exception e) {
|
|
|
eb29d7 |
- CMS.debug("Failed to send the XML output");
|
|
|
eb29d7 |
+ CMS.debug("Failed to send the XML output: " + e);
|
|
|
eb29d7 |
+ e.printStackTrace();
|
|
|
eb29d7 |
}
|
|
|
eb29d7 |
}
|
|
|
eb29d7 |
|
|
|
eb29d7 |
--
|
|
|
eb29d7 |
1.8.3.1
|
|
|
eb29d7 |
|