php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45990 ldap_get_entries does not preserve the case of the attribute
Submitted: 2008-09-04 02:42 UTC Modified: 2008-10-27 00:47 UTC
From: ninglis at nextdigital dot com Assigned:
Status: Not a bug Package: LDAP related
PHP Version: 5.2.6 OS: FreeBSD 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: ninglis at nextdigital dot com
New email:
PHP Version: OS:

 

 [2008-09-04 02:42 UTC] ninglis at nextdigital dot com
Description:
------------
ldap_get_entries() does not preserve the correct case of teh attribute names from ldap_search result. 

eg: "objectClass" becomes "objectclass"

if I use ldap_get_attributes() I do not get this problem.

the loss of case is very important as if you try to reinsert these values, the attribute names no longer match the LDAP schema.

Expected result:
----------------
    ["objectClass"]=>
    array(5) {
      ["count"]=>
      int(4)
      [0]=>
      string(3) "top"
      [1]=>
      string(6) "person"
      [2]=>
      string(13) "inetOrgPerson"
      [3]=>
      string(9) "qmailUser"
    }
    [2]=>
    string(11) "objectClass"
  

Actual result:
--------------

this is a snipet of the vardump: As you can see the "objectclass" attribute has lost its camel case


    ["objectclass"]=>
    array(5) {
      ["count"]=>
      int(4)
      [0]=>
      string(3) "top"
      [1]=>
      string(6) "person"
      [2]=>
      string(13) "inetOrgPerson"
      [3]=>
      string(9) "qmailUser"
    }
    [2]=>
    string(11) "objectclass"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-24 15:51 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #19438

 [2008-10-27 00:47 UTC] ninglis at nextdigital dot com
hymmm...

that "bug #19438" is listed as a feature request. it is also not in the LDAP section. This is not a feature request. it is a bug. The function is destroying information trapped in the camel case of the variable names. There is no way of retrieving the information.

I think it is a mistake that the previously mentioned bug is listed as a "feature request".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 15:01:30 2024 UTC