From dcc27b0a5daeac6f38a777dfd376c49bb746204a Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 17 Aug 2009 08:34:16 +0000 Subject: [PATCH] Include changeset:13750 from 2.6-lhm. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14072 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_ldap.inc | 5 ++++- gosa-core/include/class_plugin.inc | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index f3baf144d..faa963ae6 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -120,7 +120,10 @@ class LDAP{ requests. I.e. member=.... */ static function prepare4filter($dn) { - return normalizeLdap(str_replace('\\\\', '\\\\\\', LDAP::fix($dn))); + $str = normalizeLdap(str_replace('\\\\', '\\\\\\', LDAP::fix($dn))); + /* Special-case '\,' for filters */ + $str = str_replace('\\,', '\\5C2C', $str); + return $str; } diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index f58df50bc..696ce9c9e 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -968,7 +968,9 @@ class plugin if($o_ogroup == NULL){ $o_ogroup = new ogroup($this->config,$ogroup['dn']); } - unset($o_ogroup->member[$c_mem]); + /* Members are stored with their converted names, so convert $c_mem as well + to have it match in case of special characters in its name. */ + unset($o_ogroup->member[LDAP::convert($c_mem)]); $o_ogroup->member[$d_mem]= $d_mem; } } -- 2.30.2