Code

Fixed checks for terminal Service and Nfs Shares
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 05:06:11 +0000 (05:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 05:06:11 +0000 (05:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5195 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servNfs.inc
plugins/admin/systems/class_terminalService.inc

index 7569e80d3db65cc3857d6b805b157f3182eef7ee..c0ec3b286b6acdb9c749954fc3fb0313b45cac79 100644 (file)
@@ -180,7 +180,7 @@ class servnfs extends plugin
 
     // only 0-9a-z
     if(!$this->is_edit){
-      if(!preg_match("/^[a-z0-9\.\-_]+$/i",$this->name)){
+      if(!preg_match("/^[a-z0-9\._]+$/i",$this->name)){
         $message[]=_("Please specify a valid name for your share.");
       }
       if(empty($this->name)){
@@ -188,11 +188,11 @@ class servnfs extends plugin
       }
     }
 
-    if(preg_match("/[^a-z0-9._+ \|-]+/i",$this->description)){
+    if(preg_match("/[^a-z0-9äöü._+ -]+/i",$this->description)){
       $message[]=_("Description contains invalid characters.");
     }
 
-    if(preg_match("/[^a-z0-9._+ |-]/i",$this->volume)){
+    if(preg_match("/[^a-z0-9._+ -]/i",$this->volume)){
       $message[]=_("Volume contains invalid characters.");
     }
 
@@ -200,7 +200,7 @@ class servnfs extends plugin
       $message[]=_("Path contains invalid characters.");
     }
 
-    if(preg_match("/[^a-z0-9._+ \|-]/i",$this->option)){
+    if(preg_match("/[^a-z0-9\.,=_+ -]/i",$this->option)){
       $message[]=_("Option contains invalid characters.");
     }
 
index eb40ec0ac5c44ccb720c754a7bd8969211333db4..41371aac4c11c39e23e0b5ebb7c510032a088d28 100644 (file)
@@ -360,40 +360,6 @@ class termservice extends plugin
   {
     /* Call common method to give check the hook */
     $message= plugin::check();
-
-    /* Default entries can use blank hsync/vsync entries */
-    if ($this->dn != "" && $this->cn != "default" && $this->cn != "wdefault"){
-
-      /* Check vsync for correct usage */
-      $val= preg_replace ("/\s/", "", $this->gotoXVsync);
-      if (!preg_match ("/^\d+(\.\d+)?(\-\d+(\.\d+)?)?$/", $val)
-          && $this->acl_is_writeable("gotoXVsync")){
-
-        $message[]= _("Please specify a valid VSync range.");
-      } elseif ($this->acl_is_writeable("gotoXVsync")){
-        list($v1,$v2)= split ("-", $val);
-        if ($v2 != ""){
-          if ($v1 > $v2){
-            $message[]= _("Please specify a valid VSync range.");
-          }
-        }
-      }
-
-      /* Check hsync for correct usage */
-      $val= preg_replace ("/\s/", "", $this->gotoXHsync);
-      if (!preg_match ("/^\d+(\.\d+)?(\-\d+(\.\d+)?)?$/", $val)
-          && $this->acl_is_writeable("gotoXHsync")){
-
-        $message[]= _("Please specify a valid HSync range.");
-      } elseif ($this->acl_is_writeable("gotoXHsync")){
-        list($v1,$v2)= split ("-", $val);
-        if ($v2 != ""){
-          if ($v1 > $v2){
-            $message[]= _("Please specify a valid HSync range.");
-          }
-        }
-      }
-    }
     return ($message);
   }