Plugin Directory

Changeset 2955538


Ignore:
Timestamp:
08/18/2023 07:27:47 PM (3 years ago)
Author:
notetoservices
Message:

fixed throw error

Location:
upload-media-by-url/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • upload-media-by-url/trunk/readme.txt

    r2939202 r2955538  
    66Requires at least: 6.2
    77Tested up to: 6.2
    8 Stable tag: 1.0.8
     8Stable tag: 1.0.9
    99Requires PHP: 7.4
    1010Plugin URI: http://wordpress.org/plugins/upload-media-by-url/
     
    4545
    4646== Changelog ==
     47= 1.0.9 = =
     48Patched Throw Type Error (admin_footer_text) found by Roy Orbitson
     49
    4750= 1.0.8 =
    4851Fixed issue with CSRF vulnerability found by Dmitrii Ignatiev
  • upload-media-by-url/trunk/uploadmediabyurl.php

    r2941578 r2955538  
    88Author URI: https://notetoservices.com
    99License: GPLv2 or later
    10 Version: 1.0.8
     10Version: 1.0.9
    1111*/
    1212
     
    2121define('UMBU_PLUGIN_NAME', plugin_basename(UMBU_PLUGIN_DIR));
    2222
    23 add_action( 'admin_footer_text', 'umbu_media' );
     23add_action( 'admin_footer', 'umbu_media' );
    2424add_action('wp_enqueue_scripts', 'umbu_callback_css');
    2525add_action( 'admin_init','umbu_callback_css');
     
    134134
    135135    //  check for multiurl
    136     if(isset($_REQUEST["multiurl"])) { $multiurl = explode(PHP_EOL, $_REQUEST["multiurl"]); }
     136    if(isset($_REQUEST["multiurl"])) { $multiurl = preg_split( '/\A\s+|\s*?\R\s*+|\s+\z/', $_REQUEST['multiurl'], -1, PREG_SPLIT_NO_EMPTY );
     137 }
    137138
    138139    if(!empty($multiurl)) {
    139140          //    navigate through any urls
     141       
    140142          foreach($multiurl as $mu) {                   
    141143              //    download and insert as media attachment
     
    145147
    146148
    147     echo __( '<div id="openUMBU" class="modalDialog"><div><a href="" title="Close" class="close">X</a><h2>Upload Media By URL</h2><p><form action="" method="post"><textarea style="width:100%;height:300px;" name="multiurl" required/></textarea><br><small>Separate each URL by a new line</small><p><input type="submit" class="button"> <a href="" class="button">Cancel</a></p>  <input type="hidden" name="nonce" value="'.umbu_nonce().'"></form></p></div></div>');
     149    echo __( '<div id="openUMBU" class="modalDialog"><div><a href="" title="Close" class="close">X</a><h2>Upload Media By URL</h2><p><form action="" method="post"><textarea style="width:100%;height:300px;" name="multiurl" required/></textarea><br><small>Separate each URL by a new line</small><p><input type="submit" class="button"> <a href="" class="button">Cancel</a></p>  </form></p></div></div>');
    148150}
    149151
    150152
    151 
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159153?>
Note: See TracChangeset for help on using the changeset viewer.