Code

Apply fix for #5583
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Nov 2010 15:03:33 +0000 (15:03 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Nov 2010 15:03:33 +0000 (15:03 +0000)
Disallow '\' and '"' in object group names as they lead to LDAP
errors

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@20227 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-core/plugins/admin/ogroups/class_ogroup.inc

index e9456ef7aa137aeaa3e6e8c25d53cba67e111f4b..a9695489a1ebb7869c78c94f77d333ba003ca063 100644 (file)
@@ -930,8 +930,8 @@ class ogroup extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
-    if (preg_match('/[=,+<>#;]/', $this->cn)) {
-      $message[] = msgPool::invalid(_("Name"), $this->cn, "/[^=+,<>#;]/");
+    if (preg_match('/[\\\\=\",+<>#;]/', $this->cn)) {
+      $message[] = msgPool::invalid(_("Name"), $this->cn, "/[^\\\\=\"+,<>#;]/");
     }
 
     /* To many different object types? */