Code

Ensure that we enter valid names for config items
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Apr 2011 08:08:18 +0000 (08:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Apr 2011 08:08:18 +0000 (08:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20771 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc

index 4ab023fd52de8c6556a4a8e0274a485f53951808..45d8c1b433a440a8539a0a824233e51a7d7c8580 100644 (file)
@@ -730,6 +730,8 @@ class newConfigManagement extends plugin
             }
             if(in_array($values['name'],$usedNames)){
                 $msgs[] = msgPool::duplicated(_("Name"));
+            }elseif(preg_match("/[^a-z0-9]/",$values['name'])){
+                $msgs[] = msgPool::invalid(_("Name"), $values['name'], '/[a-z0-9]/');
             }
         }