pear / Net_LDAP2

Object oriented interface for searching and manipulating LDAP-entries
http://pear.php.net/package/Net_LDAP2
GNU Lesser General Public License v3.0
10 stars 6 forks source link

Net_LDAP2_Entry::update(): do not submit empty modification #9

Open brenard opened 1 year ago

brenard commented 1 year ago

I detect a bug on OpenLDAP instance with the overlay constraints enabled when I try to rename an entry : I'm using the Net_LDAP2::move() method to rename the entry and in this case :

  1. the Net_LDAP2::move() set the entry new DN with Net_LDAP2_Entry::dn() method and run Net_LDAP2_Entry::update()
  2. the Net_LDAP2_Entry::update() run the ldap_rename() function to handle the DN change
  3. finally, it run ldap_modify() function with an empty $modifications as changes

In common case, this ldap_modify without change, is useless but it's not a problem. However, when the contraints overlay is enabled, it's trigger its constraint_update() got null modlist error.