Changeset 3019209
- Timestamp:
- 01/09/2024 11:26:23 AM (2 years ago)
- Location:
- verge3d/trunk
- Files:
-
- 6 edited
-
app.php (modified) (1 diff)
-
css/admin.css (modified) (1 diff)
-
js/admin.js (modified) (2 diffs)
-
order.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
verge3d.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
verge3d/trunk/app.php
r3007908 r3019209 629 629 630 630 // prevent harmful file types to be uploaded to the server 631 $ext = strtolower(pathinfo($fullpath, PATHINFO_EXTENSION)); 632 $denied = ['php', 'phps', 'phar', 'exe']; 633 if (in_array($ext, $denied)) { 631 $allowed_mimes = get_allowed_mime_types(); 632 633 $v3d_mimes = get_option('v3d_upload_mime_types'); 634 if (!empty($v3d_mimes)) { 635 foreach (explode(PHP_EOL, $v3d_mimes) as $line) { 636 $line = wp_strip_all_tags($line); 637 $line_split = preg_split('/ +/', $line, null, PREG_SPLIT_NO_EMPTY); 638 639 if (count($line_split) != 2) 640 continue; 641 642 $mime = trim($line_split[0]); 643 $ext = trim($line_split[1]); 644 645 if (!empty($mime) && !empty($ext)) 646 $allowed_mimes[$ext] = $mime; 647 } 648 } 649 650 $validate = wp_check_filetype($fullpath, $allowed_mimes); 651 if ($validate['type'] === false) { 652 //error_log('invalid: '.$fullpath); 634 653 wp_die('error'); 635 654 } -
verge3d/trunk/css/admin.css
r2825703 r3019209 123 123 } 124 124 125 textarea.v3d-tall-textarea { 126 height: 300px; 127 } 128 125 129 p.error { 126 130 color: red; -
verge3d/trunk/js/admin.js
r2347252 r3019209 4 4 'blend1', 5 5 'max', 6 'ma', 7 'mb' 6 'ma', // maya 7 'mb', // maya 8 'mat', // max material file 9 'mel' // e.g workspace.mel 8 10 ] 9 11 … … 41 43 42 44 // prevent upload of some files 43 if ( ext in V3D_IGNORE_EXT|| path.indexOf('v3d_app_data') > -1) {45 if (V3D_IGNORE_EXT.includes(ext) || path.indexOf('v3d_app_data') > -1) { 44 46 updateProgress(); 45 47 continue; -
verge3d/trunk/order.php
r3004985 r3019209 456 456 // NOTE: undocumented wkhtmltopdf feature 457 457 if (basename($chrome_path) == 'wkhtmltopdf') 458 v3d_terminal($chrome_path.' -s Letter --print-media-type '.$pdf_html.' '. $pdf);458 v3d_terminal($chrome_path.' -s Letter --print-media-type '.$pdf_html.' '.escapeshellarg($pdf)); 459 459 else 460 v3d_terminal($chrome_path.' --headless --disable-gpu --print-to-pdf='.$pdf.' '.$pdf_html); 460 v3d_terminal($chrome_path.' --headless --disable-gpu --print-to-pdf='.escapeshellarg($pdf).' '.$pdf_html); 461 461 462 if (is_file($pdf)) 462 463 $attachments[] = $pdf; -
verge3d/trunk/readme.txt
r3007908 r3019209 5 5 Tested up to: 6.4.1 6 6 Requires PHP: 7.0 7 Stable tag: 4.5. 17 Stable tag: 4.5.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 69 69 == Changelog == 70 71 = 4.5.3 = 72 * Implement proper MIME filter for uploaded files. 73 * Fix uploaded file types not being ignored. 74 * Security fixes. 70 75 71 76 = 4.5.2 = -
verge3d/trunk/verge3d.php
r3007908 r3019209 4 4 Plugin URI: https://www.soft8soft.com/verge3d 5 5 Description: Verge3D is the most artist-friendly toolkit for creating interactive web-based experiences. It can be used to create product configurators, 3D presentations, online stores, e-learning apps, 3D portfolios, browser games and more. 6 Version: 4.5. 26 Version: 4.5.3 7 7 Author: Soft8Soft LLC 8 8 Author URI: https://www.soft8soft.com … … 287 287 delete_option('v3d_cross_domain'); 288 288 delete_option('v3d_custom_products'); 289 delete_option('v3d_upload_mime_types'); 289 290 } 290 291 register_deactivation_hook(__FILE__, 'v3d_cleanup_options'); … … 355 356 add_option('v3d_cross_domain', 1); 356 357 add_option('v3d_custom_products', 1); 358 add_option('v3d_upload_mime_types', 359 "application/json json\n". 360 "application/octet-stream bin\n". 361 "application/wasm wasm\n". 362 "application/x-xz xz\n". 363 "font/ttf ttf\n". 364 "font/woff woff\n". 365 "font/woff2 woff2\n". 366 "image/ktx2 ktx2\n". 367 "image/svg+xml svg\n". 368 "image/vnd.radiance hdr\n". 369 "model/gltf-binary glb\n". 370 "model/gltf+json gltf\n". 371 "text/csv csv\n". 372 "text/xml xml"); 357 373 358 374 register_setting('verge3d_general', 'v3d_currency'); … … 791 807 register_setting('verge3d_security', 'v3d_cross_domain'); 792 808 register_setting('verge3d_security', 'v3d_custom_products'); 809 register_setting('verge3d_security', 'v3d_upload_mime_types'); 793 810 794 811 add_settings_section( … … 823 840 ); 824 841 842 add_settings_field( 843 'v3d_upload_mime_types', 844 'Allowed MIME types', 845 'v3d_upload_mime_types_cb', 846 'verge3d_security', 847 'v3d_security_settings' 848 ); 825 849 } 826 850 add_action('admin_init', 'v3d_settings_init'); … … 1327 1351 } 1328 1352 1353 function v3d_upload_mime_types_cb() { 1354 $content = get_option('v3d_upload_mime_types'); 1355 ?> 1356 <textarea name="v3d_upload_mime_types" class="v3d-wide-textarea v3d-tall-textarea"><?php echo isset($content) ? esc_attr($content) : ''; ?></textarea> 1357 <p class="description">Additional MIME types allowed for upload.</p> 1358 <?php 1359 } 1329 1360 1330 1361 function v3d_init_custom_styles() {
Note: See TracChangeset
for help on using the changeset viewer.