Fix case-sensitivity in normalization/mapping of LDAP entries (Bug #2905)
This commit is contained in:
parent
df2ed0d8e6
commit
32ffbe0ade
1 changed files with 4 additions and 2 deletions
|
@ -329,12 +329,14 @@ class kolab_auth_ldap extends rcube_ldap_generic
|
||||||
|
|
||||||
// fields mapping
|
// fields mapping
|
||||||
foreach ($this->fieldmap as $field => $attr) {
|
foreach ($this->fieldmap as $field => $attr) {
|
||||||
// $entry is indexed by lower-case attribute names
|
// $entry might be indexed by lower-case attribute names
|
||||||
$attr_lc = strtolower($attr);
|
$attr_lc = strtolower($attr);
|
||||||
if (isset($entry[$attr_lc])) {
|
if (isset($entry[$attr_lc])) {
|
||||||
$entry[$field] = $entry[$attr_lc];
|
$entry[$field] = $entry[$attr_lc];
|
||||||
}
|
}
|
||||||
// @TODO: consider returning also $entry[$attr] when $attr != $attr_lc
|
else if (isset($entry[$attr])) {
|
||||||
|
$entry[$field] = $entry[$attr];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $entry;
|
return $entry;
|
||||||
|
|
Loading…
Add table
Reference in a new issue