Case sensitive bug with LDAP support on ldap AUTH method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OCS Inventory: OCSReports |
Fix Released
|
Low
|
Erwan |
Bug Description
PHP ldap_get_entries() function obtain attributes in case sensitive mode, so if you work with LDAP directory, these attributes are identical, because LDAP protocol is case insensitive.
entry[n]
But when you manipulate the retrieved information through PHP (ldap_get_
...
if ($info[
...
if ($info[
But at LDAP level are the same.
This bug can be corrected forcing a lowercase in the code:
if ($info[
...
$_SESSION[
...
if ($info[
...
$_SESSION[
...
This solution patchs this bug case. If yo don't apply it, if your LDAP server returns a attribute names not normalized, you could have problems in comparison values, using the attribute name as index.
For example, if you configure retrieve an entry with employeeType attribute configured a $fq_name additional attribute, yor PHP entry results in:
$info[0] = array(n) {
["employeetype"]=> array(2) { ["count"]=> int(1) [0]=> string(5) "admin" } [4]=> string(12) "employeetype"
...
}
When you initialize $_SESSION[
...
if ($info[
That implies "employeeType != employeetype".
Changed in ocsinventory-ocsreports: | |
assignee: | nobody → Erwan (airoine) |
importance: | Undecided → Low |
Changed in ocsinventory-ocsreports: | |
status: | New → Fix Committed |
Changed in ocsinventory-ocsreports: | |
status: | Fix Committed → Fix Released |