summaryrefslogtreecommitdiffstats
path: root/base/util
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-09-18 10:27:26 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-09-19 12:17:37 -0500
commit715d89dee392b9005ac493d8f354b0d8f96652bd (patch)
treeb2584179b1946d29b43e5362936702173afc92fb /base/util
parent7b737b2ea9d798cbbfb27ad15d157a7cb42fdb08 (diff)
downloadpki-715d89dee392b9005ac493d8f354b0d8f96652bd.tar.gz
pki-715d89dee392b9005ac493d8f354b0d8f96652bd.tar.xz
pki-715d89dee392b9005ac493d8f354b0d8f96652bd.zip
Added DN and filter escaping in UGSubsystem.
The UGSubsystem has been modified to escape values used in DN or filter according to LDAP standard. Ticket #193
Diffstat (limited to 'base/util')
-rw-r--r--base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java b/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java
index de8569e4d..ca894d87c 100644
--- a/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java
+++ b/base/util/src/com/netscape/cmsutil/ldap/LDAPUtil.java
@@ -60,6 +60,13 @@ public class LDAPUtil {
return sb.toString();
}
+ /**
+ * This method escapes special characters for LDAP DN (RFC 1779).
+ */
+ public static String escapeDN(Object value) {
+ return LDAPUtil.escapeDN(value.toString(), false);
+ }
+
public static String escapeDN(String v, boolean doubleEscape) {
StringBuffer result = new StringBuffer();