Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
1.0.0-M1
-
None
-
None
-
Windows XP SP3
Description
private static void recursivelyDescend(LdapConnection connection, String dn) {
System.out.println("Searching for children of dn : " + dn);
try
{
Cursor<SearchResponse> cursor = connection.search(dn, "(objectclass=)", SearchScope.ONELEVEL, "");
while (cursor.next())
{
SearchResponse response = cursor.get();
if(response instanceof SearchResultEntry)
else
{ System.out.println("Unusable response type " + response); } }
} catch (LdapException le)
catch (Exception e)
{ e.printStackTrace(); }}
The above piece of code is exercised after obtaining an SSL-based LDAP connection. The target server has hundreds of thousands of records at different levels. Logging at WARN level shows a lot of messages :
WARN NioProcessor-1 org.apache.directory.shared.asn1.ber.Asn1Decoder - The PDU has been fully decoded but there are still bytes in the buffer.
The code chokes at processing the 52nd entry that is two levels deep from the base DN. At this level there are around 1000 sub-levels.