From c6156ab855960405b6e8c5f89b22e0ca3f30f015 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 19 Nov 2010 16:21:34 +0000 Subject: [PATCH] Updated regular expression to validate domain and dc objects... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20303 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/plugins/admin/departments/class_dcObject.inc | 4 ++-- gosa-core/plugins/admin/departments/class_domain.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gosa-core/plugins/admin/departments/class_dcObject.inc b/gosa-core/plugins/admin/departments/class_dcObject.inc index 6e8abe616..7db316fe1 100644 --- a/gosa-core/plugins/admin/departments/class_dcObject.inc +++ b/gosa-core/plugins/admin/departments/class_dcObject.inc @@ -54,8 +54,8 @@ class dcObject extends department $message[]= msgPool::required(_("Name")); }elseif(tests::is_department_name_reserved($this->dc,$this->base)){ $message[]= msgPool::reserved(_("Name")); - }elseif(!preg_match ('/[a-z0-9 \.,\-_]/i', $this->dc)){ - $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/"); + }elseif(preg_match ('/[^a-z0-9 \.,\-_]/i', $this->dc)){ + $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/i"); } /* Check description */ diff --git a/gosa-core/plugins/admin/departments/class_domain.inc b/gosa-core/plugins/admin/departments/class_domain.inc index cd73d47ec..f73a997ea 100644 --- a/gosa-core/plugins/admin/departments/class_domain.inc +++ b/gosa-core/plugins/admin/departments/class_domain.inc @@ -55,7 +55,7 @@ class domain extends department }elseif(tests::is_department_name_reserved($this->dc,$this->base)){ $message[]= msgPool::reserved(_("Name")); }elseif(preg_match ('/[^a-z0-9 \.,\-_]/i', $this->dc)){ - $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/"); + $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/i"); } /* Check description */ -- 2.30.2