From dc281418d061032689a06a7f8544a70f2f874832 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 23 Jul 2010 13:05:14 +0000 Subject: [PATCH] Updated check in macro class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19088 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/gofon/macro/class_gofonMacroParameters.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc index 124567083..b825d97ef 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc @@ -335,8 +335,13 @@ class macroParameter extends plugin $message= plugin::check(); foreach($this->goFonMacroParameter as $key=>$val){ - if((strstr($val['default'],"!"))||(strstr($val['default'],"#"))) { - $message[] = sprintf(_("Parameter %s contains invalid character. '!,#' is used as delimiter!"),$val['name']); + + $v1 = utf8_encode($val['default']); + $v2 = utf8_decode($val['default']); + if($v1 != $v2){ + $allowed = preg_quote('[]()-+_,.;:/?*\ ','/'); + $message[] = msgPool::invalid(sprintf(_("Parameter %s contains invalid character!"), $val['name']), + $val['default'],"/[a-z0-9{$allowed}]/i"); } switch($val['type']){ case 'bool' : $possible = array("","0","1"); -- 2.30.2