Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Convert LDAP attribute names to lowercase, fixes #8219 (#8220)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbraz authored and jeremyjaouen committed Jul 16, 2020
1 parent 59eeb0f commit 79fbe09
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions www/class/centreonLDAP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,13 @@ public function setGeneralOptions($arId, $options)
if (is_array($value)) { //radio buttons
$value = $value[$key];
}
// Make all attributes lowercase since ldap_get_entries
// converts them to lowercase.
if (in_array($key, array("alias", "user_name", "user_email", "user_pager",
"user_firstname", "user_lastname", "group_name", "group_member"))
) {
$value = strtolower($value);
}
if (isset($gopt[$key])) {
$query = "UPDATE `auth_ressource_info`
SET `ari_value` = '" . $this->db->escape($value, false) . "'
Expand Down

0 comments on commit 79fbe09

Please sign in to comment.