6.0.0-beta1
7/20/25

[#11791] Horde_Auth_Ldap::updateUser() calls Horde_Ldap::modify() with incorrect arguments
Summary Horde_Auth_Ldap::updateUser() calls Horde_Ldap::modify() with incorrect arguments
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester bts.to.FrankEngler (at) spamgourmet (dot) com
Created 11/29/2012 (4616 days ago)
Due
Updated 01/15/2013 (4569 days ago)
Assigned 11/30/2012 (4615 days ago)
Resolved 01/15/2013 (4569 days ago)
Github Issue Link
Github Pull Request
Milestone 2.0.2
Patch Yes

History
01/15/2013 06:06:33 PM Jan Schneider State ⇒ Resolved
 
12/28/2012 06:09:20 PM Jan Schneider Comment #5 Reply to this comment
Did you actually test what I committed?
12/04/2012 06:21:38 PM bts (dot) to (dot) FrankEngler (at) spamgourmet (dot) com Comment #4 Reply to this comment
I did some short tests and it works if $olddn is null.


I did not test the case $olddn != null,  but reviewing the code it 
behaves very different:

* It calls $this->_ldap->move($olddn, $newdn) if ($oldID != $newID), but
   - does no check if $newdn is actually a DN
   - does not ensure that $oldID refers to the same user as $olddn
   - does not ensure that $newID refers to the same user as $newdn

* it uses complete $credentials for the new $entry but does not check 
if only credentials are in it

* it does not hash the password

* it does not check shadowmin

* it does not set shadowlastchange
11/30/2012 06:11:46 PM Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Feedback
Milestone ⇒ 2.0.2
Reply to this comment
Try this instead?
11/30/2012 06:11:02 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 9dc2c5b411e75d780e8b12d00526f163a5156adc
Author: Jan Schneider <jan@horde.org>
Date:   Fri Nov 30 19:10:29 2012 +0100

     [jan] Fix updating users in LDAP driver (Bug #11791).

  framework/Auth/lib/Horde/Auth/Ldap.php |    4 ++--
  framework/Auth/package.xml             |    4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)

http://git.horde.org/horde-git/-/commit/9dc2c5b411e75d780e8b12d00526f163a5156adc
11/29/2012 10:21:49 PM bts (dot) to (dot) FrankEngler (at) spamgourmet (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Horde_Auth_Ldap::updateUser() calls Horde_Ldap::modify() with incorrect arguments
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: 0001-Fix-missing-action-in-entry.patch Download
State ⇒ Unconfirmed
Reply to this comment
Horde_Ldap::modify($entry, $parms) require $params to be an 
array('action' => array('attribute1' => array('val1'))). 
Horde_Auth_Ldap::updateUser() calls Horde_Ldap::modify() with its own 
$entry as 2nd argument. This $entry is an array('attribute1' => 'val1').

In consequence no action is forwarded to Horde_Ldap::modify() an no 
modification is done at all.Despite that a successfull change is 
returned to the user.

Saved Queries