Code

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1522 594d385d-05f5-0310...
[gosa.git] / plugins / admin / fai / class_faiVariableEntry.inc
index e972c420d8b2f405aebf6e7e5388e0a932866c2e..44780047c8add96fad704f6aa30a5d4d81600586 100644 (file)
@@ -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++){