Make WordPress Core


Ignore:
Timestamp:
10/29/2020 06:44:12 PM (4 years ago)
Author:
whyisjake
Message:

General: WordPress updates

  • XML-RPC: Improve error messages for unprivileged users.
  • External Libraries: Disable deserialization in Requests_Utility_FilteredIterator
  • Embeds: Disable embeds on deactivated Multisite sites.
  • Coding standards: Modify escaping functions to avoid potential false positives.
  • XML-RPC: Return error message if attachment ID is incorrect.
  • Upgrade/install: Improve logic check when determining installation status.
  • Meta: Sanitize meta key before checking protection status.
  • Themes: Ensure that only privileged users can set a background image when a theme is using the deprecated custom background page.

Brings the changes from [49380,49382-49388] to the 5.2 branch.

Props xknown, zieladam, peterwilsoncc, whyisjake, desrosj, dd32.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/embed.php

    r47960 r49394  
    605605        $site  = reset( $sites );
    606606
    607         if ( $site && (int) $site->blog_id !== get_current_blog_id() ) {
     607        // Do not allow embeds for deleted/archived/spam sites.
     608        if ( ! empty( $site->deleted ) || ! empty( $site->spam ) || ! empty( $site->archived ) ) {
     609            return false;
     610        }
     611
     612        if ( $site && get_current_blog_id() !== (int) $site->blog_id ) {
    608613            switch_to_blog( $site->blog_id );
    609614            $switched_blog = true;
Note: See TracChangeset for help on using the changeset viewer.