summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dff324c)
raw | patch | inline | side by side (parent: dff324c)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jul 2007 14:05:20 +0000 (14:05 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jul 2007 14:05:20 +0000 (14:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6852 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history | |
plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index de12ef2a42395481df42a5b0a009114a8af6027a..04294325d4a263b086c1a88c54c05f753b092756 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
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 {
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 fff1409070996671730f6765808274084c9c693b..9aecbccdff2cb3d39578dc59596a449b74e37625 100644 (file)
$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)){