From: cajus Date: Thu, 12 Jul 2007 14:05:20 +0000 (+0000) Subject: Added more allowed characters X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a7aed838f9da37b15c47970f9d2cbb1f72cf5b14;p=gosa.git Added more allowed characters git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6852 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index de12ef2a4..04294325d 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -59,14 +59,17 @@ class LDAP{ Currently used codes: , => CO \2C => CO + \22 => TO + \" => TO + \+ => PL ( => OB ) => CB / => SL */ function convert($dn) { if (SPECIALS_OVERRIDE == TRUE){ - $tmp= preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//"), - array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL"), + $tmp= preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//", "/\\\\22/", '/\\\\"/', "/\\\\3D/", "/\\\\2B/", '/\\\\+/'), + array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL", "\001TO", "\001TO", "\001GL", "\001PL", "\001PL"), $dn); return (preg_replace('/,\s+/', ',', $tmp)); } else { @@ -82,8 +85,8 @@ class LDAP{ function fix($dn) { if (SPECIALS_OVERRIDE == TRUE){ - return (preg_replace(array("/\001CO/", "/\001OB/", "/\001CB/", "/\001SL/"), - array("\,", "(", ")", "/"), + return (preg_replace(array("/\001CO/", "/\001OB/", "/\001CB/", "/\001SL/", "/\001TO/", "/\001PL/", "/\001GL/"), + array("\,", "(", ")", "/", '\"', "\+", "="), $dn)); } else { return ($dn); diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index fff140907..9aecbccdf 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -239,7 +239,7 @@ class department extends plugin $message[]= sprintf(_("The field 'Name' contains the reserved word '%s'. Please choose another name."),$this->ou); } - if (preg_match ('/["#+:=>\\\\\/]/', $this->ou)){ + if (preg_match ('/["+>\\\\]/', $this->ou)){ $message[]= _("The field 'Name' contains invalid characters."); } if (!is_phone_nr($this->telephoneNumber)){