[Tickets #2435] NEW: $conf['auth']['params']['uid'], horde/lib/Horde/Auth/ldap.php, and case issues

bugs@bugs.horde.org bugs at bugs.horde.org
Fri Aug 12 13:46:50 PDT 2005


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

Ticket URL: http://bugs.horde.org/ticket/?id=2435
-----------------------------------------------------------------------
 Ticket             | 2435
 Created By         | beau at zoicstudios.com
 Summary            | $conf['auth']['params']['uid'], horde/lib/Horde/Auth/ldap.php, and case issues
 Queue              | Horde Base
 Version            | 3.0.5
 State              | Unconfirmed
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


beau at zoicstudios.com (2005-08-12 13:46) wrote:

If you specify $conf['auth']['params']['uid'] (in horde/config/conf.php) to
be a mixed-case string like "sAMAccountName" then many of the functions in
horde/lib/Horde/Auth/ldap.php will break.

>From line 313:

        $search = ldap_search($ldap, $this->_params['basedn'], $filter,
array($this->_params['uid']));
        $entries = ldap_get_entries($ldap, $search);
        $userlist = array();

        for ($i = 0; $i < $entries['count']; $i++) {
            $userlist[$i] = $entries[$i][$this->_params['uid']][0];
        }

In the for loop, $entries[$i]["sAMAccountName"][0] is added to
$userlist[$i], but that key does not exist.

For some reason it is converted to lowercase at some point, so if you dump
the variable you will see it contains $entries[$i]["samaccountname"][0].

If you set $conf['auth']['params']['uid'] to "samaccountname" everything
works, but I imagine many people will set it to the mixed-cased version and
there is no note to do otherwise.




More information about the bugs mailing list