Code

Include changeset:13750 from 2.6-lhm.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Aug 2009 08:34:16 +0000 (08:34 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Aug 2009 08:34:16 +0000 (08:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14072 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_ldap.inc
gosa-core/include/class_plugin.inc

index f3baf144d8905d58dbe1322c9460fac2f860562e..faa963ae6c8a63657a849e2de14a447a4e64414c 100644 (file)
@@ -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;
   }
 
 
index f58df50bc33d19a46ec9aa802fbeb7934a3d6f22..696ce9c9e424c92ffc1b9f0ae07bf6025e60b556 100644 (file)
@@ -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;
           }
         }