Make WordPress Core


Ignore:
Timestamp:
01/30/2024 02:52:50 PM (12 months ago)
Author:
jorbin
Message:

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

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

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

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

    r47280 r57401  
    574574        }
    575575
    576         if ( is_array( $value ) ) {
    577             $value = serialize( $value );
    578         }
    579576        if ( ! empty( $insert ) ) {
    580577            $insert .= ', ';
    581578        }
     579
     580        $value = maybe_serialize( sanitize_option( $option, $value ) );
     581
    582582        $insert .= $wpdb->prepare( '(%s, %s, %s)', $option, $value, $autoload );
    583583    }
Note: See TracChangeset for help on using the changeset viewer.