Code

Templates were broken when downloaded
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Sep 2006 07:08:26 +0000 (07:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Sep 2006 07:08:26 +0000 (07:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4602 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiTemplateEntry.inc

index 57eee41245f8440b826e34ff19138ea7672279f2..29267dd9245ec8069d73c9b48b6273c4a15cf4a2 100644 (file)
@@ -52,7 +52,7 @@ class faiTemplateEntry extends plugin
     $this->user = explode( '.', $this->FAIowner );
     $this->group = $this->user[1];
     $this->user = $this->user[0];
-    $_SESSION['binary'] = $this->FAItemplateFile;
+    $_SESSION['binary'] = stripslashes($this->FAItemplateFile);
     $_SESSION['binarytype'] = 'octet-stream';
     $_SESSION['binaryfile'] = basename( $this->FAItemplatePath );
     
@@ -72,14 +72,14 @@ class faiTemplateEntry extends plugin
 
     if(isset($_POST['TmpFileUpload'])){
       if($str=file_get_contents($_FILES['FAItemplateFile']['tmp_name'])){
-        $this->FAItemplateFile = $str;
+        $this->FAItemplateFile = addslashes($str);
 
         /* If we don't have a filename set it from upload filename. */
         if( 0 == strlen( $this->FAItemplatePath )){
           $this->FAItemplatePath = $_FILES['FAItemplateFile']['name'];
         }
 
-        $_SESSION['binary']     = $this->FAItemplateFile;
+        $_SESSION['binary']     = stripslashes($this->FAItemplateFile);
         $_SESSION['binarytype'] = 'octet-stream';
         $_SESSION['binaryfile'] = basename( $this->FAItemplatePath );
       }