Code

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1522 594d385d-05f5-0310...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Oct 2005 06:17:14 +0000 (06:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Oct 2005 06:17:14 +0000 (06:17 +0000)
plugins/admin/fai/class_faiHook.inc
plugins/admin/fai/class_faiHookEntry.inc
plugins/admin/fai/class_faiVariable.inc
plugins/admin/fai/class_faiVariableEntry.inc

index 14183bf191526fc969c2b8f71a4fdcf1a61f1632..12bd2b123338730e4724eebeaf37dd463b31d6d9 100644 (file)
@@ -154,11 +154,19 @@ class faiHook extends plugin
 
     $smarty->assign("SubObjects",$this->getList());
     $smarty->assign("SubObjectKeys",array_flip($this->getList()));
-    /* 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('faiHook.tpl', TRUE));
     return($display);
   }
index ced60480df9c1fd92bc8f9a09fe144a5792b530d..79e35c86ed310ad76d109a47a6653b8d9dddbf03 100644 (file)
@@ -56,10 +56,18 @@ class faiHookEntry extends plugin
       }
     }
 
+     /* 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++){
       $Object_FAIprioritys[$i]=$i;
     }
index d14d7d846fb8e8972c01958e2005863c3048f05a..d2e74c469157d5d3883ae8c8c546c3985ae782e4 100644 (file)
@@ -144,11 +144,19 @@ class faiVariable extends plugin
 
     $smarty->assign("SubObjects",$this->getList());
     $smarty->assign("SubObjectKeys",array_flip($this->getList()));
-    /* 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('faiVariable.tpl', TRUE));
     return($display);
   }
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++){