Make WordPress Core


Ignore:
Timestamp:
01/30/2024 02:48:25 PM (3 years ago)
Author:
jorbin
Message:

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

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

Location:
branches/5.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

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

    r49581 r57398  
    585585                }
    586586
    587                 if ( is_array( $value ) ) {
    588                         $value = serialize( $value );
    589                 }
    590 
    591587                if ( ! empty( $insert ) ) {
    592588                        $insert .= ', ';
    593589                }
     590
     591                $value = maybe_serialize( sanitize_option( $option, $value ) );
    594592
    595593                $insert .= $wpdb->prepare( '(%s, %s, %s)', $option, $value, $autoload );
Note: See TracChangeset for help on using the changeset viewer.