fixed issues with comma in DN
This commit is contained in:
parent
098c28339a
commit
5153f6ea17
|
@ -752,7 +752,7 @@ function searchLDAPByAttribute($name, $value, $objectClass, $attributes, $scopes
|
||||||
$filter = '';
|
$filter = '';
|
||||||
$filterParts = array();
|
$filterParts = array();
|
||||||
if ($name != null) {
|
if ($name != null) {
|
||||||
$filterParts[] = '(' . $name . '=' . $value . ')';
|
$filterParts[] = '(' . $name . '=' . ldap_escape($value) . ')';
|
||||||
}
|
}
|
||||||
if ($objectClass != null) {
|
if ($objectClass != null) {
|
||||||
$filterParts[] = '(objectClass=' . $objectClass . ')';
|
$filterParts[] = '(objectClass=' . $objectClass . ')';
|
||||||
|
|
|
@ -573,7 +573,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$types = array('gon', 'group');
|
$types = array('gon', 'group');
|
||||||
$gonList = array();
|
$gonList = array();
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$gonFilter = '(|(&(objectClass=groupOfNames)(member=' . $this->getAccountContainer()->dn_orig . '))(&(objectClass=groupOfMembers)(member=' . $this->getAccountContainer()->dn_orig . '))(&(objectClass=groupOfUniqueNames)(uniqueMember=' . $this->getAccountContainer()->dn_orig . ')))';
|
$gonFilter = '(|(&(objectClass=groupOfNames)(member=' . ldap_escape($this->getAccountContainer()->dn_orig) . '))(&(objectClass=groupOfMembers)(member=' . $this->getAccountContainer()->dn_orig . '))(&(objectClass=groupOfUniqueNames)(uniqueMember=' . $this->getAccountContainer()->dn_orig . ')))';
|
||||||
if (!empty($typeSettings['filter_' . $type])) {
|
if (!empty($typeSettings['filter_' . $type])) {
|
||||||
$typeFilter = $typeSettings['filter_' . $type];
|
$typeFilter = $typeSettings['filter_' . $type];
|
||||||
if (strpos($typeFilter, '(') !== 0) {
|
if (strpos($typeFilter, '(') !== 0) {
|
||||||
|
|
Loading…
Reference in New Issue