Make WordPress Core


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

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

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

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

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

    r31403 r57413  
    521521            $autoload = 'yes';
    522522
    523         if ( is_array($value) )
    524             $value = serialize($value);
    525523        if ( !empty($insert) )
    526524            $insert .= ', ';
     525
     526        $value = maybe_serialize( sanitize_option( $option, $value ) );
     527
    527528        $insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload );
    528529    }
Note: See TracChangeset for help on using the changeset viewer.