Code

Updated english strings
[gosa.git] / gosa-core / include / class_ldap.inc
index f888d84448df0e784076bc619191821e800e62b2..5d815810e9134838bb49e6f4e8d0f5f98b6e8b89 100644 (file)
@@ -863,10 +863,10 @@ class LDAP{
     $attrs  = (count($attributes))?implode($attributes,' '):'';
     $scope = (!empty($scope))?' -s '.$scope: '';
     $limit = (!$limit)?'':' -z '.$limit;
-    $cmd = "ldapsearch -x -LLLL '{$filter}' {$limit} {$scope} -H '{$host}' -b '{$dn}' $attrs";
+    $dn = escapeshellarg($dn);
+    $cmd = "ldapsearch -x -LLLL '{$filter}' {$limit} {$scope} -H '{$host}' -b {$dn} $attrs";
     exec($cmd, $ret,$code);
     $res = implode($ret,"\n");
-    print_a(array($res,$cmd, $ret,$code));
     return($res);
   }