View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
12692Feature requestsUser / Groups / Rolespublic2017-09-21 11:52
Reporterfunnydj Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary12692: LDAP import paging
Description

Version: 2.67.3
LDAP server is limited to 1000 results because of ldap_search.
Whit debug =2 quering a group with more than 1000 users will bring to this error "ldap_search(): Partial search results returned: Sizelimit exceeded ". Without debug it will stop at 1000 rows.
The correct way to query a ldap server is to use pagination that is supported from ldap protocol 3.

Is possible to change the ldap_helper.php adding a loop of paged results if protocol == 3?

Something like this (from php.net manual):
// enable pagination with a page size of 100.
$pageSize = 100;

 $cookie = '';
 do {
     ldap_control_paged_result($ds, $pageSize, true, $cookie);

     $result  = ldap_search($ds, $dn, $filter, $justthese);
     $entries = ldap_get_entries($ds, $result);

     foreach ($entries as $e) {
         echo $e['dn'] . PHP_EOL;
     }

     ldap_control_paged_result_response($ds, $result, $cookie);

 } while($cookie !== null && $cookie != '');

// RESET PAGED RESULT OR GET ERRORS!!!
ldap_control_paged_result($connection, 1000, false, $cookie);

TagsNo tags attached.
Attached Files
error1.PNG (40,792 bytes)   
error1.PNG (40,792 bytes)   
Bug heat0
Story point estimate
Users affected %

Users monitoring this issue

There are no users monitoring this issue.

Activities

Issue History

Date Modified Username Field Change
2017-09-21 11:52 funnydj New Issue
2017-09-21 11:52 funnydj File Added: error1.PNG
2019-11-01 17:26 c_schmitz Category User/User groups => User / Groups / Roles