Changeset 3134865
- Timestamp:
- 08/13/2024 11:16:46 AM (20 months ago)
- Location:
- import-spreadsheets-from-microsoft-excel/trunk
- Files:
-
- 3 edited
-
changelog.txt (modified) (1 diff)
-
import-spreadsheets-from-microsoft-excel.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
import-spreadsheets-from-microsoft-excel/trunk/changelog.txt
r2987931 r3134865 1 1 == Changelog == 2 3 = 10.1.5 = 4 5 * Fixed security vulnerability with zip containing disallowed file types 2 6 3 7 = 10.1.4 = -
import-spreadsheets-from-microsoft-excel/trunk/import-spreadsheets-from-microsoft-excel.php
r2987931 r3134865 5 5 Plugin URI: https://www.spreadsheetconverter.com/support/online-help/help-wordpress-plugin-to-import-spreadsheets-from-microsoft-excel 6 6 Description: Import Spreadsheets from Microsoft Excel 7 Version: 10.1. 47 Version: 10.1.5 8 8 Author: SpreadsheetConverter 9 9 Author URI: http://www.spreadsheetconverter.com … … 16 16 * 17 17 18 Copyright (C) 2019-202 0SpreadsheetConverter, http://www.spreadsheetconverter.com18 Copyright (C) 2019-2024 SpreadsheetConverter, http://www.spreadsheetconverter.com 19 19 This program is free software: you can redistribute it and/or modify 20 20 it under the terms of the GNU General Public License as published by … … 446 446 // Setup the array of supported file types. In this case, it's just PDF. 447 447 $supported_types = array( 'application/zip' ); 448 $allowed_file_extenstions = array( 'htm', 'html', 'appcache', 'js', 'css', 'png', 'jpg', 'jpeg','gif','svg', 'bmp', 'woff', 'woff2', 'ttf', 'eot'); 448 449 449 450 // Get the file type of the upload … … 488 489 489 490 $zip = new ZipArchive(); 490 $x = $zip->open($target_path); 491 $x = $zip->open($target_path); 492 $disallowed_files = array(); 491 493 492 494 if ( $x === true ) { … … 497 499 while ( ($zip_entry = zip_read($zipall)) ): 498 500 $pathall = zip_entry_name($zip_entry); 501 $extension = pathinfo($pathall, PATHINFO_EXTENSION); 502 if(!empty($extension) && !in_array(strtolower($extension), $allowed_file_extenstions)){ 503 $disallowed_files[] = $extension; 504 } 499 505 endwhile; 500 506 } … … 505 511 { 506 512 $pathall = $zip->getNameIndex( $i ); 513 $extension = pathinfo($pathall, PATHINFO_EXTENSION); 514 if(!empty($extension) && !in_array(strtolower($extension), $allowed_file_extenstions)){ 515 $disallowed_files[] = $extension; 516 } 507 517 } 508 518 } … … 519 529 520 530 } 531 532 if(count($disallowed_files) > 0){ 533 ims_fme_ssc_errorLog('The zip contains disallowed file types:' . implode(", ", array_unique($disallowed_files))); 534 set_transient( 'ims-fme-ssc-admin-notice-disallowed-file-error', implode(", ", array_unique($disallowed_files)), 5 ); 535 536 remove_action( 'save_post', 'ims_fme_ssc_save_custom_meta_data' ); 537 wp_update_post( array('ID' => intval( $id ), 'post_status' => 'draft') ); 538 add_action( 'save_post', 'ims_fme_ssc_save_custom_meta_data' ); 539 540 $zip->close(); 541 unlink($target_path); 542 543 return; 544 } 545 521 546 // change this to the correct site path 522 547 $zip->extractTo( $pub_dir.'/'); … … 538 563 $zip->close(); 539 564 unlink($target_path); 540 } 565 } 541 566 542 567 if ( file_exists( $path ) ){ … … 679 704 <?php 680 705 delete_transient( 'ims-fme-ssc-admin-notice-zip-error' ); 706 707 } elseif( get_transient( 'ims-fme-ssc-admin-notice-disallowed-file-error' ) ) { ?> 708 <div class="updated" style="color:red"><p>The zip contains disallowed file types: <?php echo get_transient( 'ims-fme-ssc-admin-notice-disallowed-file-error' ); ?> </p></div> 709 <?php 710 delete_transient( 'ims-fme-ssc-admin-notice-disallowed-file-error' ); 681 711 682 712 }/*elseif( get_transient( 'ims-fme-ssc-admin-notice-plug-special-char' ) ) { ?> -
import-spreadsheets-from-microsoft-excel/trunk/readme.txt
r2987931 r3134865 5 5 Tags: excel, spreadsheet, xls, xlsx, embed, import, upload, form, calculator, viewer, chart, graph 6 6 Requires at least: 4.5 7 Tested up to: 6. 1.17 Tested up to: 6.6.1 8 8 Requires PHP: 5.2.4 9 Stable tag: 10.1. 49 Stable tag: 10.1.5 10 10 11 11 Import live, calculating spreadsheets from Microsoft Excel to WordPress. The uploaded online spreadsheet is live, and looks and feels like in Excel. … … 357 357 == Changelog == 358 358 359 = 10.1.5 = 360 361 * Fixed security vulnerability with zip containing disallowed file types 362 359 363 = 10.1.4 = 360 364
Note: See TracChangeset
for help on using the changeset viewer.