Changeset 57412
- Timestamp:
- 01/30/2024 03:12:40 PM (9 months ago)
- Location:
- branches/4.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/trunk merged: 57388-57389
- Property svn:mergeinfo changed
-
branches/4.3/src/wp-admin/includes/class-wp-upgrader.php
r38528 r57412 2431 2431 if ( isset( $file['error'] ) ) 2432 2432 wp_die( $file['error'] ); 2433 2434 if ( 'pluginzip' === $form || 'themezip' === $form ) { 2435 $archive_is_valid = false; 2436 2437 /** This filter is documented in wp-admin/includes/file.php */ 2438 if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { 2439 $archive = new ZipArchive(); 2440 $archive_is_valid = $archive->open( $file['file'], ZIPARCHIVE::CHECKCONS ); 2441 2442 if ( true === $archive_is_valid ) { 2443 $archive->close(); 2444 } 2445 } else { 2446 require_once ABSPATH . 'wp-admin/includes/class-pclzip.php'; 2447 2448 $archive = new PclZip( $file['file'] ); 2449 $archive_is_valid = is_array( $archive->properties() ); 2450 } 2451 2452 if ( true !== $archive_is_valid ) { 2453 wp_delete_file( $file['file'] ); 2454 wp_die( __( 'Incompatible Archive.' ) ); 2455 } 2456 } 2433 2457 2434 2458 $this->filename = $_FILES[$form]['name']; -
branches/4.3/src/wp-admin/includes/schema.php
r33621 r57412 530 530 $autoload = 'yes'; 531 531 532 if ( is_array($value) )533 $value = serialize($value);534 532 if ( !empty($insert) ) 535 533 $insert .= ', '; 534 535 $value = maybe_serialize( sanitize_option( $option, $value ) ); 536 536 537 $insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload ); 537 538 } -
branches/4.3/src/wp-admin/update.php
r31994 r57412 130 130 check_admin_referer('plugin-upload'); 131 131 132 if ( isset( $_FILES['pluginzip']['name'] ) && ! str_ends_with( strtolower( $_FILES['pluginzip']['name'] ), '.zip' ) ) { 133 wp_die( __( 'Only .zip archives may be uploaded.' ) ); 134 } 135 132 136 $file_upload = new File_Upload_Upgrader('pluginzip', 'package'); 133 137 … … 234 238 235 239 check_admin_referer('theme-upload'); 240 241 if ( isset( $_FILES['themezip']['name'] ) && ! str_ends_with( strtolower( $_FILES['themezip']['name'] ), '.zip' ) ) { 242 wp_die( __( 'Only .zip archives may be uploaded.' ) ); 243 } 236 244 237 245 $file_upload = new File_Upload_Upgrader('themezip', 'package');
Note: See TracChangeset
for help on using the changeset viewer.