summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e315a2d)
raw | patch | inline | side by side (parent: e315a2d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jun 2006 06:17:29 +0000 (06:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jun 2006 06:17:29 +0000 (06:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3886 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index dbcfc24d6f1b359057f2bfe211f50575f0bc9d48..5295eb2849f7c7ec34f76bf5da21d5683387191d 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
}
/* Split the line into attribute and value */
- $attr = split(":", $row);
+ $attr = split(":", $row,2);
$attr[0]= trim($attr[0]); /* attribute */
- $attr[1]= trim($attr[1]); /* value */
+ $attr[1]= $attr[1]; /* value */
- $attr[0] = trim( preg_replace("/:.*$/","",$row));
- $attr[1] = trim( preg_replace("/^".$attr[0]."[ ::]/","",$row));
+ /* Check :: was used to indicate base64_encoded strings */
+ if($attr[1][0] == ":"){
+ $attr[1]=trim(preg_replace("/^:/","",$attr[1]));
+ $attr[1]=base64_decode($attr[1]);
+ }
+
+ $attr[1] = trim($attr[1]);
/* Check for attributes that are used more than once */
if(!isset($data[$attr[0]])) {
$this->cd ($this->basedn);
$this->create_missing_trees($data['dn']);
$this->cd($data['dn']);
+
$dn = $data['dn'];
unset($data['dn']);