Code

bugfix: escaping dn with NET::LDAP::Util in new_ldap_config message for si-client
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jul 2008 09:41:09 +0000 (09:41 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jul 2008 09:41:09 +0000 (09:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11742 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/modules/ClientPackages.pm

index b7d87a42d33158e1cdc67a9976c965330b3ff315..9c2ac1e579b484f8d5eb029e7d2e23e8ec41a9e1 100644 (file)
@@ -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;