Changeset 3020507
- Timestamp:
- 01/11/2024 04:06:26 PM (2 years ago)
- Location:
- piotnetforms/trunk
- Files:
-
- 3 edited
-
inc/forms/ajax-form-builder.php (modified) (2 diffs)
-
piotnetforms.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
piotnetforms/trunk/inc/forms/ajax-form-builder.php
r3013279 r3020507 464 464 $attachment = array(); 465 465 466 $not_allowed_extensions = array('php', 'phpt', 'php5', 'php7', 'exe'); 466 $allowed_extensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'mp3', 'wav', 'ogg', 'mp4', 'avi', 'mkv', 'mov', 'txt', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'csv', 'json', 'xml', 'css', 'zip', 'rar', 'tar.gz']; 467 $allowed_extensions = apply_filters( 'piotnetforms/form_builder/allowed_upload_file_extensions', $allowed_extensions ); 467 468 468 469 if( !empty($_FILES) ) { … … 472 473 $file_name_san = sanitize_file_name($file['name'][$i]); 473 474 $file_extension = pathinfo( $file_name_san, PATHINFO_EXTENSION ); 474 $mime_types = wp_get_mime_types(); 475 $wp_extension_allowed = false; 476 foreach ($mime_types as $extensions => $mime_type) { 477 $extensions_array = explode('|', $extensions); 478 if (in_array($file_extension, $extensions_array)) { 479 $wp_extension_allowed = true; 480 } 481 } 482 483 if(in_array(strtolower($file_extension), $not_allowed_extensions) || !$wp_extension_allowed){ 475 476 if(!in_array(strtolower($file_extension), $allowed_extensions)) { 484 477 wp_die(); 485 478 } -
piotnetforms/trunk/piotnetforms.php
r3013279 r3020507 4 4 * Description: Piotnet Forms - Highly Customizable WordPress Form Builder 5 5 * Plugin URI: https://piotnetforms.com/ 6 * Version: 1.0.2 86 * Version: 1.0.29 7 7 * Author: Piotnet 8 8 * Author URI: https://piotnet.com/ … … 15 15 require_once __DIR__ . '/inc/variables.php'; 16 16 17 define( 'PIOTNETFORMS_VERSION', '1.0.2 8' );17 define( 'PIOTNETFORMS_VERSION', '1.0.29' ); 18 18 19 19 class Piotnetforms extends Piotnetforms_Variables { -
piotnetforms/trunk/readme.txt
r3020504 r3020507 5 5 Tested up to: 6.1 6 6 Requires PHP: 5.4 7 Stable tag: 1.0.2 77 Stable tag: 1.0.29 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 77 77 78 78 == Changelog == 79 = 1.0.29 = 80 * Add allowed Upload file extensions filter hook. 79 81 = 1.0.28 = 80 82 * Improvement security issue.
Note: See TracChangeset
for help on using the changeset viewer.