Plugin Directory

Changeset 3037244


Ignore:
Timestamp:
02/17/2024 06:53:57 PM (2 years ago)
Author:
wpyog
Message:

tested on latest version and resolve Vulnerability issues

Location:
wpyog-documents/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpyog-documents/trunk/index.php

    r2973008 r3037244  
    55Author: WPYog
    66Author URI: http://wpyog.com/
    7 Version: 1.3.2
     7Version: 1.3.3
    88License:            GPLv2 or later
    99License URI:        http://www.gnu.org/licenses/gpl-2.0.html
     
    312312}
    313313
    314 add_action('template_redirect','wpyog_document_template_redirect');
    315 function wpyog_document_template_redirect() {
    316   if (isset($_REQUEST['download_url']) && !empty($_REQUEST['download_url'])) {
     314if (isset($_REQUEST['download_url']) && !empty($_REQUEST['download_url'])) {
    317315    $filepath = $_REQUEST['download_url'];
    318     header('Content-Description: File Transfer');
    319     header('Content-Type: application/octet-stream');
    320     header('Content-Disposition: attachment; filename="'.basename($filepath).'"');
    321     header('Expires: 0');
    322     header('Cache-Control: must-revalidate');
    323     header('Pragma: public');
    324     header('Content-Length: ' . filesize($filepath));
    325     flush(); // Flush system output buffer
    326     readfile($filepath);
    327     die();
    328   }
    329 }
     316    if( strpos( $filepath, "/wp-content/uploads/" ) !== false ){
     317        header('Content-Description: File Transfer');
     318        header('Content-Type: application/octet-stream');
     319        header('Content-Disposition: attachment; filename="'.basename($filepath).'"');
     320        header('Expires: 0');
     321        header('Cache-Control: must-revalidate');
     322        header('Pragma: public');
     323        header('Content-Length: ' . filesize($filepath));
     324        flush(); // Flush system output buffer
     325        readfile($filepath);
     326        die();
     327    }
     328}
     329
    330330add_action( 'upgrader_process_complete', 'wpyog_plugin_upgrade_completed', 10, 2 );
    331331
  • wpyog-documents/trunk/readme.txt

    r2973008 r3037244  
    55Tags: Document Management, Document, Simple Documents , Topics, PDF document upload, Word document upload
    66Requires at least: 4.0
    7 Tested up to: 6.2
     7Tested up to: 6.4.3
    88Stable tag: trunk
    99License: GPLv2 or later
     
    2020Show only selected Documents: Choose documents selectively by ID and list them into pages, posts or any other post types.
    2121
    22 * NEW IN VERSION 1.3.2
     22* NEW IN VERSION 1.3.3
    2323    * Category Filters allows you to sort your documents easily.
    2424    * Support for post order type, which allows you to custom sort your documents.
Note: See TracChangeset for help on using the changeset viewer.