From c3849fe1cdcf719933b7d3ca64c85403a40aef79 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Tue, 22 Jul 2008 09:41:09 +0000 Subject: [PATCH] bugfix: escaping dn with NET::LDAP::Util in new_ldap_config message for si-client git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11742 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/ClientPackages.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gosa-si/modules/ClientPackages.pm b/gosa-si/modules/ClientPackages.pm index b7d87a42d..9c2ac1e57 100644 --- a/gosa-si/modules/ClientPackages.pm +++ b/gosa-si/modules/ClientPackages.pm @@ -13,6 +13,7 @@ use XML::Simple; use Data::Dumper; use NetAddr::IP; use Net::LDAP; +use Net::LDAP::Util; use Socket; use Net::hostent; @@ -644,10 +645,11 @@ sub new_ldap_config { # Do we need to look at an object class? if (not @servers){ + my $escaped_dn = &escape_dn_value($dn); $mesg = $ldap_handle->search( base => $ldap_base, scope => 'sub', attrs => ['dn', 'gotoLdapServer', 'FAIclass'], - filter => "(&(objectClass=gosaGroupOfNames)(member=$dn))"); + filter => "(&(objectClass=gosaGroupOfNames)(member=$escaped_dn))"); if($mesg->code) { &main::daemon_log("$session_id ERROR: unable to search for '(&(objectClass=gosaGroupOfNames)(member=$dn))': ".$mesg->error, 1); return; -- 2.30.2