Changeset 2475134
- Timestamp:
- 02/15/2021 08:49:49 PM (5 years ago)
- Location:
- external-media/trunk
- Files:
-
- 3 edited
-
external-media.php (modified) (2 diffs)
-
includes/WP_ExternalPluginBase.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
external-media/trunk/external-media.php
r2406122 r2475134 8 8 Plugin Name: External Media 9 9 Description: Import files from thrid-party services (Dropbox, Box, OneDrive, Google Drive and any remote URL). 10 Version: 1.0.2 710 Version: 1.0.28 11 11 Author: Minnur Yunusov 12 12 Author URI: http://www.minnur.com/ … … 18 18 define( 'WP_ExternalMedia_PluginName', plugin_basename( __FILE__ ) ); 19 19 define( 'WP_ExternalMedia_Prefix', 'WPExternalMedia_' ); 20 define( 'WP_ExternalMedia_Version', '1.0.2 7' );20 define( 'WP_ExternalMedia_Version', '1.0.28' ); 21 21 22 22 if ( !class_exists( 'WP_ExternalMedia' ) ) { -
external-media/trunk/includes/WP_ExternalPluginBase.php
r2335386 r2475134 200 200 201 201 if ( !function_exists( 'curl_init' ) || empty( $filename ) ) { 202 return; 203 } 204 205 $extensions = apply_filters( 'external_media_safe_extensions', 'jpg jpeg gif png mp3 mp4 m4v mov webm' ); 206 if ($this->isUnsafe( $filename, $extensions )) { 202 207 return; 203 208 } … … 279 284 } 280 285 286 /** 287 * Check if file extension is unsafe to upload. 288 */ 289 protected function isUnsafe( $filename, $extensions ) { 290 if (preg_match('/\.(php|phar|pl|py|cgi|asp|js|html|htm|xml)(\.|$)/i', $filename)) { 291 $regex = '/\.(' . preg_replace('/ +/', '|', preg_quote($extensions)) . ')$/i'; 292 if (!preg_match($regex, $filename)) { 293 return true; 294 } 295 } 296 } 297 281 298 } -
external-media/trunk/readme.txt
r2406122 r2475134 7 7 Requires at least: 5.4 8 8 Tested up to: 5.5.1 9 Stable tag: 1.0.2 79 Stable tag: 1.0.28 10 10 Requires PHP: 7.1 11 11 License: GPLv2 or later … … 131 131 == Changelog == 132 132 133 = 1.0.28 = 134 * Improve security. 135 * Version bump. 133 136 = 1.0.27 = 134 137 * Update plugin information.
Note: See TracChangeset
for help on using the changeset viewer.