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 | 08/12/2005 (7287 days ago) |
Due | |
Updated | 08/04/2006 (6930 days ago) |
Assigned | 08/12/2005 (7287 days ago) |
Resolved | 08/04/2006 (6930 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
http://us2.php.net/ldap_search
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.
State ⇒ Assigned
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ $conf['auth']['params']['uid'], horde/lib/Horde/Auth/ldap.php, and case issues
Queue ⇒ Horde Base
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.