php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79187 ldap_parse_result return error
Submitted: 2020-01-29 07:14 UTC Modified: 2021-03-23 13:44 UTC
From: angel dot castellanos at audisec dot es Assigned:
Status: Not a bug Package: LDAP related
PHP Version: 7.4.2 OS: CentOS 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: angel dot castellanos at audisec dot es
New email:
PHP Version: OS:

 

 [2020-01-29 07:14 UTC] angel dot castellanos at audisec dot es
Description:
------------
---
From manual page: https://php.net/function.ldap-parse-result
---
We are trying to implement the pagination in the ldap_search method after the ldap_control_paged_result_response() and ldap_control_paged_result() methods are deprecated using example number 5 that appears at https://doc.bccnsoft.com/docs/php-docs-7.4-en/ldap.examples-controls.html.

When we use the ldap_parse_result method to extract the information from the result of ldap_search, we see that the $controls object has been updated and contains the correct cookie value, but the page size value appears as 0.

Is this correct?

Shouldn't it contain the page size value of the control that is used in ldap_search?



Expected result:
----------------
The expected result is that the $controls object contains the page size used.

Actual result:
--------------
The current result is that the $ controls object contains page size 0.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-22 11:06 UTC] mcmic@php.net
Hello!

From the RFC:
«In the control returned to the client, the
   size MAY be set to the server's estimate of the total number of
   entries in the entire result set. Servers that cannot provide such an
   estimate MAY set this size to zero (0).»

So it is expected that the size entry in the response control may be 0, even if there are entries in the result.

Please do not use the same object to pass in the request control and to parse the response control.
 [2021-03-23 13:44 UTC] mcmic@php.net
-Status: Open +Status: Not a bug
 [2021-03-23 13:44 UTC] mcmic@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 16:01:29 2024 UTC