Code

Added check in logonScriptManagement to avoid | in name/description ...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Aug 2005 08:08:35 +0000 (08:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Aug 2005 08:08:35 +0000 (08:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1241 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_logonManagementDialog.inc

index b2bdea79c99055ff37688bf3dda2201e3f084af7..ea1dcca55d0fec0f92ea948ffa8d45304405d076 100644 (file)
@@ -84,6 +84,22 @@ class logonManagementDialog extends plugin
     }
   }
 
+  function check()
+  {
+  $message = array();
+  
+  if(preg_match("/[^a-z]/",$this->LogonName)){
+    $message[] = _("Specified name is invalid.");
+  } 
+  
+  if(preg_match("/[^a-z0-9,\.-;:_\(\)!\? ]/i",$this->LogonDescription)){
+    $message[] = _("Specified decription contains invalid characters.");
+  }
+  return $message;
+  }
+
+
   function save()
   {
     $a_return= array();