Skip to content

Commit 5fea59a

Browse files
author
blackhedd
committed
fixed a regression caused by the introduction of
RFC-2696 paged-result controls. These broke openLDAP versions 2.2.x and greater because we were using a page size of 739, while openLDAP doesn't like anything bigger than 126.
1 parent bc62156 commit 5fea59a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/net/ldap.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,11 @@ def search args = {}
907907
scope = args[:scope] || Net::LDAP::SearchScope_WholeSubtree
908908
raise LdapError.new( "invalid search scope" ) unless SearchScopes.include?(scope)
909909

910-
rfc2696_cookie = [739, ""] # size-limit is a funky number so we can distinguish it from errors.
910+
# An interesting value for the size limit would be close to A/D's built-in
911+
# page limit of 1000 records, but openLDAP newer than version 2.2.0 chokes
912+
# on anything bigger than 126. You get a silent error that is easily visible
913+
# by running slapd in debug mode. Go figure.
914+
rfc2696_cookie = [126, ""]
911915
result_code = 0
912916

913917
loop {

0 commit comments

Comments
 (0)