From 86984ae31ecfb45910810f69d4b4b69f1384fdfe Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 23 Nov 2006 05:06:11 +0000 Subject: [PATCH] Fixed checks for terminal Service and Nfs Shares git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5195 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servNfs.inc | 8 ++--- .../admin/systems/class_terminalService.inc | 34 ------------------- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/plugins/admin/systems/class_servNfs.inc b/plugins/admin/systems/class_servNfs.inc index 7569e80d3..c0ec3b286 100644 --- a/plugins/admin/systems/class_servNfs.inc +++ b/plugins/admin/systems/class_servNfs.inc @@ -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."); } diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index eb40ec0ac..41371aac4 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -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); } -- 2.30.2