Plugin Directory

Changeset 2516532


Ignore:
Timestamp:
04/16/2021 08:02:42 PM (5 years ago)
Author:
minnur
Message:

Bump version

Location:
external-media/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • external-media/trunk/external-media.php

    r2491814 r2516532  
    88  Plugin Name: External Media
    99  Description: Import files from thrid-party services (Dropbox, Box, OneDrive, Google Drive and any remote URL).
    10   Version: 1.0.30
     10  Version: 1.0.31
    1111  Author: Minnur Yunusov
    1212  Author URI: http://www.minnur.com/
     
    1818define( 'WP_ExternalMedia_PluginName', plugin_basename( __FILE__ ) );
    1919define( 'WP_ExternalMedia_Prefix', 'WPExternalMedia_' );
    20 define( 'WP_ExternalMedia_Version', '1.0.30' );
     20define( 'WP_ExternalMedia_Version', '1.0.31' );
    2121
    2222if ( !class_exists( 'WP_ExternalMedia' ) ) {
  • external-media/trunk/includes/WP_ExternalMedia.php

    r2335386 r2516532  
    4545    $caption = !empty($_POST['caption']) ? $_POST['caption'] : '';
    4646    $referer = !empty($_POST['referer']) ? $_POST['referer'] : '';
    47     $loaded_plugin = $this->load_plugin( $plugin );
    48     $this->_call_class_method( $loaded_plugin['phpClassName'], 'download', array( $file, $filename, $caption, $referer ) );
     47
     48    if ( wp_verify_nonce( $_POST['nonce'], 'external-media-nonce' ) ) {
     49      $loaded_plugin = $this->load_plugin( $plugin );
     50      $this->_call_class_method( $loaded_plugin['phpClassName'], 'download', array( $file, $filename, $caption, $referer ) );
     51    }
     52
    4953  }
    5054
     
    143147    wp_enqueue_script( $prefix . '_js' );
    144148    wp_enqueue_script( $prefix . '_view_js' );
     149
     150    wp_register_script( 'dummy-handle-header', '' );
     151    wp_enqueue_script( 'dummy-handle-header' );
     152    wp_add_inline_script( 'dummy-handle-header', 'var _external_media_nonce = "' . wp_create_nonce( 'external-media-nonce' ) . '";' );
    145153  }
    146154
  • external-media/trunk/readme.txt

    r2491814 r2516532  
    77Requires at least: 5.4
    88Tested up to: 5.5.1
    9 Stable tag: 1.0.30
     9Stable tag: 1.0.31
    1010Requires PHP: 7.1
    1111License: GPLv2 or later
     
    131131== Changelog ==
    132132
     133= 1.0.31 =
     134* Improve security. Add nonce check.
     135* Version bump.
    133136= 1.0.30 =
    134137* Improve security. Add permission check.
Note: See TracChangeset for help on using the changeset viewer.