X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_ldap.inc;h=5d815810e9134838bb49e6f4e8d0f5f98b6e8b89;hb=b9fc1972cf2270252fc2a9940feab21c93372e94;hp=f888d84448df0e784076bc619191821e800e62b2;hpb=2c62fc905bdd29d54ff520f99c02dd47b535a30a;p=gosa.git diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index f888d8444..5d815810e 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -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); }