Bug #77806 [NEW]: Effective rights control attributes

From: Date: Wed, 27 Mar 2019 12:55:20 +0000
Subject: Bug #77806 [NEW]: Effective rights control attributes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220226@lists.php.net to get a copy of this message
From: alec Operating system: PHP version: 7.3.3 Package: LDAP related Bug Type: Bug Bug description:Effective rights control attributes Description: ------------ I'm using PHP 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:31:49) ( NTS ) See the sample script below. If I replace the attributes argument in ldap_search() call with ["*"] I get the expected result. So, it looks like the attributes argument limits the attributes considered by the effective rights control. This is unexpected. I expected to limit only result attributes of the ldap entry, but not for the server control. Is there a way to set attributes=* for the control and keep attributes=['entryLevelRights', 'attributeLevelRights'] for the search result? This might be a bug or feature request. Or maybe I don't understand ldap and effective rights control internals and this is impossible. Test script: --------------- $dn = 'ou=Groups,dc=example,dc=org'; $bind_dn = 'cn=Directory Manager'; $conn = ldap_connect('ldap://192.168.56.101:389'); ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_bind($conn, $bind_dn, 'password'); $result = ldap_search($conn, $dn, '(objectclass=*)', ['entryLevelRights', 'attributeLevelRights'], 0, -1, -1, LDAP_DEREF_NEVER, [ ['oid' => "1.3.6.1.4.1.42.2.27.9.5.2", 'value' => "dn:$bind_dn"] ]); $entry = ldap_get_attributes($conn, ldap_first_entry($conn, $result)); echo $entry['attributeLevelRights'][0]; Expected result: ---------------- Something like: objectClass:rscwo, aci:rscwo, ou:rscwo, businessCategory:rscwo, description:rscwo, destinationIndicator:rscwo, facsimileTelephoneNumber:rscwo, internationalISDNNumber:rscwo, l:rscwo, physicalDeliveryOfficeName:rscwo, postalAddress:rscwo, postalCode:rscwo, postOfficeBox:rscwo, preferredDeliveryMethod:rscwo, registeredAddress:rscwo, searchGuide:rscwo, seeAlso:rscwo, st:rscwo, street:rscwo, telephoneNumber:rscwo, teletexTerminalIdentifier:rscwo, telexNumber:rscwo, userPassword:rscwo, x121Address:rscwo Actual result: -------------- entrylevelrights:none, attributelevelrights:none -- Edit bug report at https://bugs.php.net/bug.php?id=77806&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77806&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77806&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77806&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77806&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77806&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77806&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77806&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77806&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77806&r=support Expected behavior: https://bugs.php.net/fix.php?id=77806&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77806&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77806&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77806&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77806&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77806&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77806&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77806&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77806&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77806&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77806&r=mysqlcfg

« previous php.bugs (#220226) next »