From: cajus Date: Tue, 3 Nov 2009 11:31:29 +0000 (+0000) Subject: Added support for missing double quotes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cd21a23b84b4d6f7beb7056ab5de057ca57629c7;p=gosa.git Added support for missing double quotes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14732 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 4b578a8f9..9b968fd9d 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -87,12 +87,13 @@ class LDAP{ \2C => CO ( => OB ) => CB - / => SL */ + / => SL + \22 => DQ */ static function convert($dn) { if (SPECIALS_OVERRIDE == TRUE){ - $tmp= preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//"), - array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL"), + $tmp= preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//", "/\\\\22/", '/\\\\"/'), + array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL", "\001DQ", "\001DQ"), $dn); return (preg_replace('/,\s+/', ',', $tmp)); } else { @@ -108,8 +109,8 @@ class LDAP{ static function fix($dn) { if (SPECIALS_OVERRIDE == TRUE){ - return (preg_replace(array("/\001CO/", "/\001OB/", "/\001CB/", "/\001SL/"), - array("\,", "(", ")", "/"), + return (preg_replace(array("/\001CO/", "/\001OB/", "/\001CB/", "/\001SL/", "/\001DQ/"), + array("\,", "(", ")", "/", '\"'), $dn)); } else { return ($dn); diff --git a/gosa-core/plugins/admin/departments/tabs_department.inc b/gosa-core/plugins/admin/departments/tabs_department.inc index c3d23e567..47f9e7a50 100644 --- a/gosa-core/plugins/admin/departments/tabs_department.inc +++ b/gosa-core/plugins/admin/departments/tabs_department.inc @@ -55,6 +55,7 @@ class deptabs extends tabs $baseobject= &$this->by_object[$this->base_name]; $namingAttr = $baseobject->namingAttr; $nAV = preg_replace('/,/', '\,', $baseobject->$namingAttr); + $nAV = preg_replace('/"/', '\"', $nAV); $new_dn = @LDAP::convert($namingAttr.'='.$nAV.','.$baseobject->base); /* Move group? */