From 5ceeec7a235bded42e4eea8b82e544e4825e9796 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 15 Jan 2008 13:19:26 +0000 Subject: [PATCH] Oups - a couple of member= fixes needed to make it work completely... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8354 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_ldap.inc | 8 ++++++++ gosa-core/include/class_location.inc | 4 ++-- gosa-core/include/class_plugin.inc | 2 +- gosa-core/plugins/admin/acl/class_aclRole.inc | 2 +- .../admin/applications/class_applicationGeneric.inc | 2 +- .../admin/departments/class_departmentManagement.inc | 2 +- gosa-core/plugins/admin/groups/class_groupGeneric.inc | 2 +- .../plugins/admin/mimetypes/class_mimetypeGeneric.inc | 2 +- .../plugins/admin/systems/class_componentGeneric.inc | 2 +- gosa-core/plugins/admin/systems/class_phoneGeneric.inc | 2 +- gosa-core/plugins/admin/systems/class_printGeneric.inc | 2 +- gosa-core/plugins/admin/systems/class_servGeneric.inc | 2 +- gosa-core/plugins/admin/systems/class_terminalGeneric.inc | 4 ++-- gosa-core/plugins/admin/systems/class_terminalService.inc | 2 +- gosa-core/plugins/admin/systems/class_terminalStartup.inc | 2 +- gosa-core/plugins/admin/systems/class_winGeneric.inc | 2 +- .../plugins/admin/systems/class_workstationGeneric.inc | 4 ++-- .../plugins/admin/systems/class_workstationService.inc | 2 +- .../plugins/admin/systems/class_workstationStartup.inc | 2 +- gosa-core/plugins/generic/references/class_reference.inc | 2 +- .../gofon/conference/class_phoneConferenceManagment.inc | 2 +- gosa-core/plugins/gofon/macro/class_gofonMacro.inc | 2 +- gosa-core/plugins/personal/generic/class_user.inc | 2 +- gosa-core/setup/class_setupStep_Migrate.inc | 8 ++++---- 24 files changed, 37 insertions(+), 29 deletions(-) diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 625d052cd..489f3954e 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -91,6 +91,14 @@ class LDAP{ } + /* Function to fix problematic characters in DN's that are used for search + requests. I.e. member=.... */ + static function prepare4filter($dn) + { + return normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($dn))); + } + + function connect() { $this->hascon=false; diff --git a/gosa-core/include/class_location.inc b/gosa-core/include/class_location.inc index a0ba97bbe..ec6e57843 100644 --- a/gosa-core/include/class_location.inc +++ b/gosa-core/include/class_location.inc @@ -186,8 +186,8 @@ $class_mapping= array( "divListUsers" => "plugins/admin/users/class_divListUsers.inc", "userManagement" => "plugins/admin/users/class_userManagement.inc", "usertabs" => "plugins/admin/users/tabs_user.inc", + "fai_func" => "plugins/admin/fai/functions_FAI.inc", "faiTemplateEntry" => "plugins/admin/fai/class_faiTemplateEntry.inc", - "fai_func" => "plugins/admin/fai/functions_FAI.inc", "faiTemplate" => "plugins/admin/fai/class_faiTemplate.inc", "tabsTemplate" => "plugins/admin/fai/tabsTemplate.inc", "faiProfileEntry" => "plugins/admin/fai/class_faiProfileEntry.inc", @@ -307,4 +307,4 @@ $class_mapping= array( "setup" => "setup/class_setup.inc", "Step_Migrate" => "setup/class_setupStep_Migrate.inc", ); -?> +?> \ No newline at end of file diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 9e5d706d3..29e884040 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -822,7 +822,7 @@ class plugin { /* Rename dn in possible object groups */ $ldap= $this->config->get_ldap_link(); - $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::fix($src_dn).'))', + $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::preapre4filter($src_dn).'))', array('cn')); while ($attrs= $ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc index 9c72d0ab5..01581ab9b 100644 --- a/gosa-core/plugins/admin/acl/class_aclRole.inc +++ b/gosa-core/plugins/admin/acl/class_aclRole.inc @@ -606,7 +606,7 @@ class aclrole extends acl /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/applications/class_applicationGeneric.inc b/gosa-core/plugins/admin/applications/class_applicationGeneric.inc index daa97d637..247acf972 100644 --- a/gosa-core/plugins/admin/applications/class_applicationGeneric.inc +++ b/gosa-core/plugins/admin/applications/class_applicationGeneric.inc @@ -242,7 +242,7 @@ class application extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index c8577edb2..adb1bed53 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -491,7 +491,7 @@ class departmentManagement extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index 2de314404..24c16c7bc 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -564,7 +564,7 @@ class group extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc index 1895e163a..03867ebab 100644 --- a/gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -513,7 +513,7 @@ class mimetype extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_componentGeneric.inc b/gosa-core/plugins/admin/systems/class_componentGeneric.inc index 2772f3501..583625188 100644 --- a/gosa-core/plugins/admin/systems/class_componentGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_componentGeneric.inc @@ -141,7 +141,7 @@ class componentGeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_phoneGeneric.inc b/gosa-core/plugins/admin/systems/class_phoneGeneric.inc index 3357e5c0b..444e3f6f3 100644 --- a/gosa-core/plugins/admin/systems/class_phoneGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_phoneGeneric.inc @@ -284,7 +284,7 @@ class phoneGeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_printGeneric.inc b/gosa-core/plugins/admin/systems/class_printGeneric.inc index b2954dc04..8940a9356 100644 --- a/gosa-core/plugins/admin/systems/class_printGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_printGeneric.inc @@ -605,7 +605,7 @@ class printgeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_servGeneric.inc b/gosa-core/plugins/admin/systems/class_servGeneric.inc index c0f1d595c..91eec6805 100644 --- a/gosa-core/plugins/admin/systems/class_servGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_servGeneric.inc @@ -252,7 +252,7 @@ class servgeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_terminalGeneric.inc b/gosa-core/plugins/admin/systems/class_terminalGeneric.inc index 6782d8fab..cdd9b8d68 100644 --- a/gosa-core/plugins/admin/systems/class_terminalGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_terminalGeneric.inc @@ -73,7 +73,7 @@ class termgeneric extends plugin if(!isset($this->parent->by_object['ogroup'])){ $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->config->current['BASE']); - $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn")); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn")); $this->member_of_ogroup = $ldap->count() >= 1; } @@ -385,7 +385,7 @@ class termgeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_terminalService.inc b/gosa-core/plugins/admin/systems/class_terminalService.inc index e73acf229..54e1d865d 100644 --- a/gosa-core/plugins/admin/systems/class_terminalService.inc +++ b/gosa-core/plugins/admin/systems/class_terminalService.inc @@ -200,7 +200,7 @@ class termservice extends plugin /* Load hardware list */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))"); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))"); if ($ldap->count() == 1){ $map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout", "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport"); diff --git a/gosa-core/plugins/admin/systems/class_terminalStartup.inc b/gosa-core/plugins/admin/systems/class_terminalStartup.inc index b03aa140b..362bc7d8c 100644 --- a/gosa-core/plugins/admin/systems/class_terminalStartup.inc +++ b/gosa-core/plugins/admin/systems/class_terminalStartup.inc @@ -139,7 +139,7 @@ class termstartup extends plugin /* Load hardware list */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))"); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))"); if ($ldap->count() == 1){ $map= array("gotoLdapServer"); $attrs= $ldap->fetch(); diff --git a/gosa-core/plugins/admin/systems/class_winGeneric.inc b/gosa-core/plugins/admin/systems/class_winGeneric.inc index 8e2126611..559446548 100644 --- a/gosa-core/plugins/admin/systems/class_winGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_winGeneric.inc @@ -161,7 +161,7 @@ class wingeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_workstationGeneric.inc b/gosa-core/plugins/admin/systems/class_workstationGeneric.inc index 505397535..0f0f97a98 100644 --- a/gosa-core/plugins/admin/systems/class_workstationGeneric.inc +++ b/gosa-core/plugins/admin/systems/class_workstationGeneric.inc @@ -78,7 +78,7 @@ class workgeneric extends plugin if(!isset($this->parent->by_object['ogroup'])){ $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->config->current['BASE']); - $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($this->dn)))."))",array("cn")); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn")); $this->member_of_ogroup = $ldap->count() >= 1; } @@ -368,7 +368,7 @@ class workgeneric extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/admin/systems/class_workstationService.inc b/gosa-core/plugins/admin/systems/class_workstationService.inc index 5b1a43e1a..815b52c0c 100644 --- a/gosa-core/plugins/admin/systems/class_workstationService.inc +++ b/gosa-core/plugins/admin/systems/class_workstationService.inc @@ -182,7 +182,7 @@ class workservice extends plugin /* Load hardware list */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))"); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))"); if ($ldap->count() == 1){ $map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout", "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport"); diff --git a/gosa-core/plugins/admin/systems/class_workstationStartup.inc b/gosa-core/plugins/admin/systems/class_workstationStartup.inc index 97410c8dc..a63fdd327 100644 --- a/gosa-core/plugins/admin/systems/class_workstationStartup.inc +++ b/gosa-core/plugins/admin/systems/class_workstationStartup.inc @@ -77,7 +77,7 @@ class workstartup extends plugin if(!isset($this->parent->by_object['ogroup'])){ $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->config->current['BASE']); - $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn","dn")); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn","dn")); if($ldap->count()){ $this->member_of_ogroup = TRUE; $attrs = $ldap->fetch(); diff --git a/gosa-core/plugins/generic/references/class_reference.inc b/gosa-core/plugins/generic/references/class_reference.inc index ed33bec45..faac2d0d5 100644 --- a/gosa-core/plugins/generic/references/class_reference.inc +++ b/gosa-core/plugins/generic/references/class_reference.inc @@ -83,7 +83,7 @@ class reference extends plugin $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $ldap->search("(|(member=".normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($this->dn))).")(memberUid=".$this->uid."))",array("memberUid","member","cn","description","objectClass")); + $ldap->search("(|(member=".LDAP::prepare4filter($this->dn).")(memberUid=".$this->uid."))",array("memberUid","member","cn","description","objectClass")); $cycle= array("F5F5F5", "ECECEC"); $id= 0; diff --git a/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc b/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc index 65fccd9b9..50b4b241b 100644 --- a/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -451,7 +451,7 @@ class phoneConferenceManagment extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new conftab($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/gofon/macro/class_gofonMacro.inc b/gosa-core/plugins/gofon/macro/class_gofonMacro.inc index f4ed4a8ba..07e10f0aa 100644 --- a/gosa-core/plugins/gofon/macro/class_gofonMacro.inc +++ b/gosa-core/plugins/gofon/macro/class_gofonMacro.inc @@ -492,7 +492,7 @@ class macro extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 035b55714..ee7da75d6 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -661,7 +661,7 @@ class user extends plugin /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn")); + $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::preapre4filter($this->dn)."))", array("cn")); while ($ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc index 16dbf8a27..f60281976 100644 --- a/gosa-core/setup/class_setupStep_Migrate.inc +++ b/gosa-core/setup/class_setupStep_Migrate.inc @@ -1067,7 +1067,7 @@ class Step_Migrate extends setup_step /* Check if there are references to this object */ - $ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn')); + $ldap->search("(&(member=".LDAP::prepare4filter($dn).")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn')); $refs = ""; while($attrs = $ldap->fetch()){ $ref_dn = $attrs['dn']; @@ -1115,7 +1115,7 @@ class Step_Migrate extends setup_step $this->outside_groups[$b_dn]['ldif'] = _("Group will be moved from").":
\t".($ldap->fix($dn))."
"._("to").":
\t".($ldap->fix($d_dn)); /* Check if there are references to this object */ - $ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn')); + $ldap->search("(&(member=".LDAP::prepare4filter($dn).")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn')); $refs = ""; while($attrs = $ldap->fetch()){ $ref_dn = $attrs['dn']; @@ -1162,7 +1162,7 @@ class Step_Migrate extends setup_step $this->outside_users[$b_dn]['ldif'] = _("User will be moved from").":
\t".($ldap->fix($dn))."
"._("to").":
\t".($ldap->fix($d_dn)); /* Check if there are references to this object */ - $ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn')); + $ldap->search("(&(member=".LDAP::prepare4filter($dn).")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn')); $refs = ""; while($attrs = $ldap->fetch()){ $ref_dn = $attrs['dn']; @@ -1891,7 +1891,7 @@ class Step_Migrate extends setup_step /* Update object references in gosaGroupOfNames */ $ogs_to_fix = array(); $ldap->cd($cv['base']); - $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::fix($source).'))', array('cn','member')); + $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::prepare4filter($source).'))', array('cn','member')); while ($attrs= $ldap->fetch()){ $dn = $attrs['dn']; $attrs = $this->cleanup_array($attrs); -- 2.30.2