[Tickets #12519] Inconsistent use of $user & $username in passwd/lib/Driver/Ldap.php

noreply at bugs.horde.org noreply at bugs.horde.org
Wed Jul 31 20:39:06 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12519
------------------------------------------------------------------------------
  Ticket             | 12519
  Created By         | adorman at ironicdesign.com
  Summary            | Inconsistent use of $user & $username in
                     | passwd/lib/Driver/Ldap.php
  Queue              | Passwd
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


adorman at ironicdesign.com (2013-07-31 20:39) wrote:

The protected function _changePassword($user, $oldpass, $newpass)  
accepts $user as input, but it uses $username in a couple of places  
where it should be using $user.  This causes an incorrect user on line  
101 and empty userdn on line 110.

Sorry I do not have a full patch...But here is a diff showing the fixed lines.

diff ../Ldap.php.old ../Ldap.php.new
101c101
<             $username .= '@' . $this->_params['realm'];
---
>             $user .= '@' . $this->_params['realm'];
109,110c109,110
<             // $this->_userdn = $this->_ldap->findUserDN($username);
<             $this->_userdn = $this->_params['uid'] . '=' . $username  
. ',' . $this->_params['basedn'];
---
>             // $this->_userdn = $this->_ldap->findUserDN($user);
>             $this->_userdn = $this->_params['uid'] . '=' . $user .  
> ',' . $this->_params['basedn'];






More information about the bugs mailing list