Fix #yogosha6411
This commit is contained in:
parent
3a5770f679
commit
1c87420895
@ -958,7 +958,7 @@ class Ldap
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define filter
|
// Define filter
|
||||||
if (!empty($activefilter)) {
|
if (!empty($activefilter)) { // Use a predefined trusted filter (defined into setup by admin).
|
||||||
if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter) {
|
if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter) {
|
||||||
$filter = '('.$this->filter.')';
|
$filter = '('.$this->filter.')';
|
||||||
} elseif (((string) $activefilter == 'group') && $this->filtergroup ) {
|
} elseif (((string) $activefilter == 'group') && $this->filtergroup ) {
|
||||||
@ -966,11 +966,11 @@ class Ldap
|
|||||||
} elseif (((string) $activefilter == 'member') && $this->filter) {
|
} elseif (((string) $activefilter == 'member') && $this->filter) {
|
||||||
$filter = '('.$this->filtermember.')';
|
$filter = '('.$this->filtermember.')';
|
||||||
} else {
|
} else {
|
||||||
// If this->filter is empty, make fiter on * (all)
|
// If this->filter/this->filtergroup is empty, make fiter on * (all)
|
||||||
$filter = '('.$useridentifier.'=*)';
|
$filter = '('.ldap_escape($useridentifier, '', LDAP_ESCAPE_FILTER).'=*)';
|
||||||
}
|
}
|
||||||
} else {
|
} else { // Use a filter forged using the $search value
|
||||||
$filter = '('.$useridentifier.'='.$search.')';
|
$filter = '('.ldap_escape($useridentifier, '', LDAP_ESCAPE_FILTER).'='.ldap_escape($search, '', LDAP_ESCAPE_FILTER).')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($attributeArray)) {
|
if (is_array($attributeArray)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user