Code

Added FAIprofile selection for Workstations
[gosa.git] / plugins / admin / fai / class_faiProfile.inc
index 4b2d26df9ab93da4723c647cfa347adae104f0a3..5ca3329b1550f2d7c50d21f0d97607efe6b51f97 100644 (file)
@@ -170,11 +170,18 @@ class faiProfile extends plugin
     $smarty->assign("divlisthead" ,$listhead);
     $smarty->assign("divlist"     ,$divlist->DrawList());
 
-    /* Assign variables */
+     /* 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,$this->$attrs);
+      if(get_magic_quotes_gpc()){
+        $smarty->assign($attrs,stripslashes($this->$attrs));
+      }else{
+        $smarty->assign($attrs,($this->$attrs));
+      }
     }
 
+
     $display.= $smarty->fetch(get_template_path('faiProfile.tpl', TRUE));
     return($display);
   }