diff options
Diffstat (limited to 'base/tps-tomcat/src/org/dogtagpki/server/tps/dbs/TokenDatabase.java')
-rw-r--r-- | base/tps-tomcat/src/org/dogtagpki/server/tps/dbs/TokenDatabase.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/dbs/TokenDatabase.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/dbs/TokenDatabase.java index 517d3151e..6f5a79094 100644 --- a/base/tps-tomcat/src/org/dogtagpki/server/tps/dbs/TokenDatabase.java +++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/dbs/TokenDatabase.java @@ -20,9 +20,12 @@ package org.dogtagpki.server.tps.dbs; import java.util.Date; +import org.apache.commons.lang.StringUtils; + import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.dbs.IDBSubsystem; import com.netscape.cmscore.dbs.LDAPDatabase; +import com.netscape.cmsutil.ldap.LDAPUtil; /** * @author Endi S. Dewata @@ -55,6 +58,6 @@ public class TokenDatabase extends LDAPDatabase<TokenRecord> { @Override public String createFilter(String filter) { - return "(id=*)"; + return StringUtils.isEmpty(filter) ? "(id=*)" : "(id=*"+LDAPUtil.escapeFilter(filter)+"*)"; } } |