diff options
Diffstat (limited to 'pki/base/common/src')
-rw-r--r-- | pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java index e5d1f9e0f..5a1c51731 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java +++ b/pki/base/common/src/com/netscape/cms/servlet/cert/ListCerts.java @@ -67,6 +67,7 @@ public class ListCerts extends CMSServlet { private String mDirection = null; private boolean mUseClientFilter = false; private Vector mAllowedClientFilters = new Vector(); + private int mMaxReturns = 2000; /** * Constructs query key servlet. @@ -97,6 +98,12 @@ public class ListCerts extends CMSServlet { if (mOutputTemplatePath != null) mFormPath = mOutputTemplatePath; + try { + mMaxReturns = Integer.parseInt(sc.getInitParameter("maxResults")); + } catch (Exception e) { + /* do nothing, just use the default if integer parsing failed */ + } + /* useClientFilter should be off by default. We keep this parameter around so that we do not break the client applications that submits raw LDAP @@ -231,6 +238,10 @@ public class ListCerts extends CMSServlet { if (req.getParameter("maxCount") != null) { maxCount = Integer.parseInt(req.getParameter("maxCount")); } + if (maxCount == -1 || maxCount > mMaxReturns) { + com.netscape.certsrv.apps.CMS.debug("Resetting page size from " + maxCount + " to " + mMaxReturns); + maxCount = mMaxReturns; + } String sentinelStr = ""; if (mReverse) { |