Make WordPress Core


Ignore:
Timestamp:
01/30/2024 03:15:17 PM (16 months ago)
Author:
jorbin
Message:

Grouped Backports to the 4.1 branch.

  • Install: When populating options, maybe_serialize instead of always serialize.
  • Uploads: Check for and verify ZIP archives.

Merges [57388] and [57389] to the 4.1 branch.

Props costdev, peterwilsoncc, azaozz, tykoted, johnbillion, desrosj, afragen, jorbin, xknown.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-admin/update.php

    r30649 r57414  
    130130        check_admin_referer('plugin-upload');
    131131
     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
    132136        $file_upload = new File_Upload_Upgrader('pluginzip', 'package');
    133137
     
    234238
    235239        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        }
    236244
    237245        $file_upload = new File_Upload_Upgrader('themezip', 'package');
Note: See TracChangeset for help on using the changeset viewer.