Plugin Directory

Changeset 674187


Ignore:
Timestamp:
02/27/2013 06:08:53 PM (13 years ago)
Author:
Aurelien
Message:

Add security correction patch

Location:
force-image-download/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • force-image-download/trunk/force-download.php

    r653495 r674187  
    33Plugin Name: Force Images Download
    44Description: Force the download of image media files by adding the 'forceDownload' css class to any link.
    5 Version: 1.0.1
     5Version: 1.1
    66Author: Aurélien Chappard
    77Author URI: http://www.deefuse.fr/
     
    7171                    {
    7272                        $type = $mime_types[$extension];
     73                        //echo $type;
     74                       
     75                        header('Content-Description: File Transfer');
     76                        header("Content-disposition: attachment; filename=".basename($urlFileToDl));
     77                        header("Content-Type: $type");
     78                        header("Content-Transfer-Encoding: $type\n" );
     79                        header("Content-Length: ".filesize($urlFileToDl));
     80                        ob_clean();
     81                        flush();
     82                        readfile( $urlFileToDl);
     83                        exit();
    7384                    }
    74 
    75                     header('Content-Description: File Transfer');
    76                     header("Content-disposition: attachment; filename=".basename($urlFileToDl));
    77                     header("Content-Type: $type");
    78                     header("Content-Transfer-Encoding: $type\n" );
    79                     header("Content-Length: ".filesize($urlFileToDl));
    80                     ob_clean();
    81                     flush();
    82                     readfile( $urlFileToDl);
    83                     exit();
     85                    else{
     86                            wp_redirect(home_url());exit();
     87                    }
    8488                }
    8589            }       
  • force-image-download/trunk/readme.txt

    r653495 r674187  
    44Requires at least: 3.0.0
    55Tested up to: 3.5
    6 Stable tag: 1.0.1
     6Stable tag: 1.1
    77License: GPL
    88
     
    2929== Changelog ==
    3030
     31= 1.1 =
     32* Correction security break (thanks you Francisco Torres)
     33
    3134= 1.0.1 =
    3235* Move screeshot to asset directory
Note: See TracChangeset for help on using the changeset viewer.