From d3581e1d11750b54af94f3b52fe5d0363116a7c4 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 1 Aug 2008 08:25:06 +0000 Subject: [PATCH] Unified group check in FAI templates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12089 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc index 85f3ea6f8..5a4ab856b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc @@ -215,8 +215,12 @@ class faiTemplateEntry extends plugin if(empty($this->group)){ $message[] = msgPool::required(_("Group")); } - elseif(preg_match("/[^0-9a-z]/i",$this->group)){ - $message[] = msgPool::invalid(_("Group"),$this->group,"/[0-9a-z]/"); + elseif (!tests::is_uid($this->group)){ + if (strict_uid_mode()){ + $message[]= msgPool::invalid(_("Group"), $this->group, "/[a-z0-9_-]/"); + } else { + $message[]= msgPool::invalid(_("Group"), $this->group, "/[a-z0-9_-]/i"); + } } return ($message); -- 2.30.2