Make WordPress Core


Ignore:
Timestamp:
10/29/2020 06:50:55 PM (6 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.0 branch.

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

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0

  • branches/5.0/src/wp-includes/formatting.php

    r47647 r49396  
    10911091 */
    10921092function utf8_uri_encode( $utf8_string, $length = 0 ) {
    1093         $unicode = '';
    1094         $values = array();
    1095         $num_octets = 1;
     1093        $unicode        = '';
     1094        $values         = array();
     1095        $num_octets     = 1;
    10961096        $unicode_length = 0;
    10971097
     
    11051105
    11061106                if ( $value < 128 ) {
    1107                         if ( $length && ( $unicode_length >= $length ) )
     1107                        if ( $length && ( $unicode_length >= $length ) ) {
    11081108                                break;
    1109                         $unicode .= chr($value);
     1109                        }
     1110                        $unicode .= chr( $value );
    11101111                        $unicode_length++;
    11111112                } else {
     
    20082009                        $title = mb_strtolower($title, 'UTF-8');
    20092010                }
    2010                 $title = utf8_uri_encode($title, 200);
     2011                $title = utf8_uri_encode( $title, 200 );
    20112012        }
    20122013
Note: See TracChangeset for help on using the changeset viewer.