Changeset 2955538
- Timestamp:
- 08/18/2023 07:27:47 PM (3 years ago)
- Location:
- upload-media-by-url/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
uploadmediabyurl.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
upload-media-by-url/trunk/readme.txt
r2939202 r2955538 6 6 Requires at least: 6.2 7 7 Tested up to: 6.2 8 Stable tag: 1.0. 88 Stable tag: 1.0.9 9 9 Requires PHP: 7.4 10 10 Plugin URI: http://wordpress.org/plugins/upload-media-by-url/ … … 45 45 46 46 == Changelog == 47 = 1.0.9 = = 48 Patched Throw Type Error (admin_footer_text) found by Roy Orbitson 49 47 50 = 1.0.8 = 48 51 Fixed issue with CSRF vulnerability found by Dmitrii Ignatiev -
upload-media-by-url/trunk/uploadmediabyurl.php
r2941578 r2955538 8 8 Author URI: https://notetoservices.com 9 9 License: GPLv2 or later 10 Version: 1.0. 810 Version: 1.0.9 11 11 */ 12 12 … … 21 21 define('UMBU_PLUGIN_NAME', plugin_basename(UMBU_PLUGIN_DIR)); 22 22 23 add_action( 'admin_footer _text', 'umbu_media' );23 add_action( 'admin_footer', 'umbu_media' ); 24 24 add_action('wp_enqueue_scripts', 'umbu_callback_css'); 25 25 add_action( 'admin_init','umbu_callback_css'); … … 134 134 135 135 // 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 } 137 138 138 139 if(!empty($multiurl)) { 139 140 // navigate through any urls 141 140 142 foreach($multiurl as $mu) { 141 143 // download and insert as media attachment … … 145 147 146 148 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>'); 148 150 } 149 151 150 152 151 152 153 154 155 156 157 158 159 153 ?>
Note: See TracChangeset
for help on using the changeset viewer.