- Timestamp:
- 01/30/2024 03:03:04 PM (14 months ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
- Property svn:mergeinfo changed
/trunk merged: 57388-57389
- Property svn:mergeinfo changed
-
branches/4.9/src/wp-admin/includes/class-file-upload-upgrader.php
r41289 r57406 64 64 wp_die( $file['error'] ); 65 65 66 if ( 'pluginzip' === $form || 'themezip' === $form ) { 67 $archive_is_valid = false; 68 69 /** This filter is documented in wp-admin/includes/file.php */ 70 if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { 71 $archive = new ZipArchive(); 72 $archive_is_valid = $archive->open( $file['file'], ZIPARCHIVE::CHECKCONS ); 73 74 if ( true === $archive_is_valid ) { 75 $archive->close(); 76 } 77 } else { 78 require_once ABSPATH . 'wp-admin/includes/class-pclzip.php'; 79 80 $archive = new PclZip( $file['file'] ); 81 $archive_is_valid = is_array( $archive->properties() ); 82 } 83 84 if ( true !== $archive_is_valid ) { 85 wp_delete_file( $file['file'] ); 86 wp_die( __( 'Incompatible Archive.' ) ); 87 } 88 } 89 66 90 $this->filename = $_FILES[$form]['name']; 67 91 $this->package = $file['file'];
Note: See TracChangeset
for help on using the changeset viewer.