Make WordPress Core


Ignore:
Timestamp:
01/30/2024 03:06:32 PM (9 months ago)
Author:
jorbin
Message:

Grouped Backports to the 4.7 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.7 branch.

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

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-admin/includes/schema.php

    r39076 r57408  
    547547            $autoload = 'yes';
    548548
    549         if ( is_array($value) )
    550             $value = serialize($value);
    551549        if ( !empty($insert) )
    552550            $insert .= ', ';
     551
     552        $value = maybe_serialize( sanitize_option( $option, $value ) );
     553
    553554        $insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload );
    554555    }
Note: See TracChangeset for help on using the changeset viewer.