php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #31209 LDAP modify interface implementation deficiency
Submitted: 2004-12-20 19:28 UTC Modified: 2015-06-10 10:33 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tomas dot drbohlav at mff dot cuni dot cz Assigned: mcmic (profile)
Status: Closed Package: LDAP related
PHP Version: * OS: *
Private report: No CVE-ID: None
 [2004-12-20 19:28 UTC] tomas dot drbohlav at mff dot cuni dot cz
Description:
------------
It is not possible to run more then one type of modify operation in a single request.

E.g. it is impossible to change password on  LDAP (Novell NDS) because you have to request delete (incl. old pass) and add new pass, both in one call of ldap_modify_s() (LDAP API).

In Perl NET::Ldap I would do:

$ldap->modify($user,
changes => [
  delete => [userPassword => $oldPwd],
  add =>[userPassword => $newPwd]                                  ]);

In PHP I can send only separate requests what fails because the attribute (eg. userPassword) must stay non-empty.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-08 21:49 UTC] jani@php.net
-Package: Feature/Change Request +Package: LDAP related -Operating System: any +Operating System: * -PHP Version: Irrelevant +PHP Version: *
 [2015-05-05 19:59 UTC] andreas at heigl dot org
Can we close this issue? After 11 years the syntax has changed in a way that this is obsolete AFAIK.

ldap_modify(
    $ldap_res, 
    $dnToModify, 
    array('userPassword'=>array($newPassword)
);
 [2015-06-10 10:33 UTC] mcmic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mcmic
 [2015-06-10 10:33 UTC] mcmic@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 17:05:53 2022 UTC