Bug #74023 [Com]: ldap_control_paged_result cannot be undone
| From: | markusu49 at aol dot com | Date: | Tue, 31 Jan 2017 15:56:31 +0000 |
| Subject: | Bug #74023 [Com]: ldap_control_paged_result cannot be undone | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207074@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74023&edit=1
ID: 74023
Comment by: markusu49 at aol dot com
Reported by: markusu49 at aol dot com
Summary: ldap_control_paged_result cannot be undone
Status: Open
Type: Bug
Package: LDAP related
Operating System: linux (Ubuntu Server 16.04.1)
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
I created a working java example to show that it's no server side issue:
https://github.com/markusu49/ldap-pagination/blob/master/ldap.java
Previous Comments:
------------------------------------------------------------------------
[2017-01-31 15:00:42] markusu49 at aol dot com
Description:
------------
It's not possible to reset ldap_control_paged_result. Should work with a pagesize of 0. See
here: https://www.ietf.org/rfc/rfc2696.txt
"A sequence of paged search requests is abandoned by the client sending a search request
containing a pagedResultsControl with the size set to zero (0) and the cookie set to the last cookie
returned by the server."
The comments in the docs point this out, too: http://php.net/manual/de/function.ldap-control-paged-result.php#119433
LDAP servers behave differently, OpenLDAP even reacts with a segfault.
Test script:
---------------
https://github.com/markusu49/ldap-pagination/blob/master/ldap.php
Expected result:
----------------
ldap_search returns all entries (eventually limited by server)
Actual result:
--------------
ldap_search returns 0 entries with AD, OpenLDAP segfaults
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74023&edit=1