Code

Updated preg_matches
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 05:07:42 +0000 (05:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 05:07:42 +0000 (05:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5196 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servNfs.inc

index 280d611896cedb5d34065a45e89b47a7c7bc52d3..043813d5e93b264215a78f5fdb7e995ee4db5edb 100644 (file)
@@ -180,7 +180,7 @@ class servnfs extends plugin
       $message[]=_("Please specify a valid path for your setup.");
     }
 
-    // only 0-9a-z
+    // Skip if there are diallowed characters 
     if(!$this->is_edit){
       if(!preg_match("/^[a-z0-9\.\-_]+$/i",$this->name)){
         $message[]=_("Please specify a valid name for your share.");
@@ -190,11 +190,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.");
     }
   
@@ -202,7 +202,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.");
     }