X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Ffai%2Fclass_faiVariableEntry.inc;h=44780047c8add96fad704f6aa30a5d4d81600586;hb=e51bd609d694c4708925f3ae3ca8556caabe7720;hp=3f993cb90c9c0a4bdd56f19364261976074734b6;hpb=1d9578d8ee2d5a59bd4f9777785ef8567ab8cef1;p=gosa.git diff --git a/plugins/admin/fai/class_faiVariableEntry.inc b/plugins/admin/fai/class_faiVariableEntry.inc index 3f993cb90..44780047c 100644 --- a/plugins/admin/fai/class_faiVariableEntry.inc +++ b/plugins/admin/fai/class_faiVariableEntry.inc @@ -41,8 +41,15 @@ class faiVariableEntry extends plugin $smarty = get_smarty(); $display = ""; + /* Magic quotes GPC, escapes every ' " \, to solve some security risks + * If we post the escaped strings they will be escaped again + */ foreach($this->attributes as $attrs){ - $smarty->assign($attrs,stripslashes($this->$attrs)); + if(get_magic_quotes_gpc()){ + $smarty->assign($attrs,stripslashes($this->$attrs)); + }else{ + $smarty->assign($attrs,($this->$attrs)); + } } for($i =1 ; $i <= 100 ; $i++){ @@ -72,19 +79,10 @@ class faiVariableEntry extends plugin { $message= array(); - $str = utf8_encode("üöä"); if(empty($this->Object_FAIvariableContent)) { $message[]=_("Please specify a value for the attribute 'content'."); } - if(empty($this->Object_description)){ - $message[] = _("Please enter a description."); - } - - if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->Object_description)){ - $message[] = _("Invalid character in description. Please enter a valid description."); - } - if(empty($this->Object_cn)){ $message[] = _("Please enter a name."); }