Code

Apply fix for #1957
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Feb 2010 15:33:33 +0000 (15:33 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Feb 2010 15:33:33 +0000 (15:33 +0000)
Check object group names for characters which would need
special quoting (,=+<>#).

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

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

index 991937afa05d319245796a9047aa368ded4ff50d..d36a32fd5370ed5b9f7d62ceda7a1548853cff79 100644 (file)
@@ -932,6 +932,10 @@ class ogroup extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
+    if (preg_match('/[=,+<>#;]/', $this->cn)) {
+      $message[] = msgPool::invalid(_("Name"), $this->cn, "/[^=+,<>#;]/");
+    }
+
     /* To many different object types? */
     if (strlen($this->gosaGroupObjects) > 4){
       $message[]= _("You can combine two different object types at maximum, only!");