Code

Updated regular expression to validate domain and dc objects...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 16:21:34 +0000 (16:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 16:21:34 +0000 (16:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20303 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_dcObject.inc
gosa-core/plugins/admin/departments/class_domain.inc

index 6e8abe616871be4fdaecaa35f5c544b5155bd67e..7db316fe159857171b70964985c97c5dd2fde063 100644 (file)
@@ -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 */
index cd73d47ecb7bda2444881e4bda3c53ed2e6b026c..f73a997ea2a575e9386320d519be46820f77e86f 100644 (file)
@@ -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 */