[#2435] $conf['auth']['params']['uid'], horde/lib/Horde/Auth/ldap.php, and case issues
Summary $conf['auth']['params']['uid'], horde/lib/Horde/Auth/ldap.php, and case issues
Queue Horde Base
Queue Version 3.0.5
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at)
Requester beau (at) zoicstudios (dot) com
Created 2005-08-12 (5003 days ago)
Updated 2006-08-04 (4646 days ago)
Assigned 2005-08-12 (5003 days ago)
Resolved 2006-08-04 (4646 days ago)
Patch No

2006-08-04 16:57:00 Jan Schneider Comment #3
State ⇒ Resolved
Reply to this comment
Fixed in CVS and Horde 3.1.3
2005-08-13 03:05:04 beau (at) zoicstudios (dot) com Comment #2 Reply to this comment
If you look at:


you'll see someone has added a comment that results returned by 
ldap_search have their keys set to all lowercase--looks like this is a 
problem with the PHP SNMP extension.
2005-08-12 22:21:30 Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
2005-08-12 20:46:49 beau (at) zoicstudios (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ $conf['auth']['params']['uid'], horde/lib/Horde/Auth/ldap.php, and case issues
Queue ⇒ Horde Base
Reply to this comment
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 

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.

Saved Queries