Code

Added check for application name
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Sep 2005 07:13:09 +0000 (07:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Sep 2005 07:13:09 +0000 (07:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1297 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationGeneric.inc

index 351d6e458cb1234aa8183e055ddd26173d6a8903..c4e8ea30057185cd9b8ce3b48184cc97aba2d6e1 100644 (file)
@@ -133,6 +133,7 @@ class application extends plugin
   function save_object()
   {
        if (isset($_POST['cn'])){
+       
                plugin::save_object();
 
                /* Save application flags */
@@ -244,6 +245,11 @@ class application extends plugin
        if ($this->cn == ""){
                $message[]= _("Required field 'Name' is not filled.");
        }
+
+       if(preg_match("/[^a-z0-9]/",$this->cn)) {
+               $message[]=_("Invalid character in application name. Only a-z 0-9 are allowed.");
+       }
+
        if ($this->gosaApplicationExecute == ""){
                $message[]= _("Required field 'Execute' is not filled.");
        }