From 1e99420f077c6595a6098da8b0685a852668852f Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Apr 2010 12:47:48 +0000 Subject: [PATCH] Updated Export git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17842 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_SnapshotHandler.inc | 2 +- gosa-core/include/class_ldap.inc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_SnapshotHandler.inc b/gosa-core/include/class_SnapshotHandler.inc index 6327555e8..ae04963fb 100644 --- a/gosa-core/include/class_SnapshotHandler.inc +++ b/gosa-core/include/class_SnapshotHandler.inc @@ -296,7 +296,7 @@ class SnapshotHandler { $new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base; /* Create object */ - $data = $ldap->generateLdif($dn, + $data = $ldap->generateLdif(LDAP::fix($dn), "(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))",array(),'base'); $newName = str_replace(".", "", $sec."-".$usec); diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 1a991f1b6..5d815810e 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -863,7 +863,8 @@ 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"); return($res); -- 2.30.2