Make WordPress Core

Changeset 53964


Ignore:
Timestamp:
08/30/2022 03:22:21 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Grouped backports to the 5.9 branch.

  • Posts, Post Types: Escape output within the_meta().
  • General: Ensure bookmark query limits are numeric.
  • Plugins: Escape output in error messages.
Location:
branches/5.9
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-admin/plugins.php

    r51475 r53964  
    613613                        __( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
    614614                        '<code>' . esc_html( $plugin_file ) . '</code>',
    615                         $error->get_error_message()
     615                        esc_html( $error->get_error_message() )
    616616                );
    617617                echo '</p></div>';
    … …  
    677677                                        /* translators: %s: Error message. */
    678678                                        __( 'Plugin could not be deleted due to an error: %s' ),
    679                                         $delete_result->get_error_message()
     679                                        esc_html( $delete_result->get_error_message() )
    680680                                );
    681681                                ?>
  • branches/5.9/src/wp-includes/bookmark.php

    r50936 r53964  
    308308        $query .= " ORDER BY $orderby $order";
    309309        if ( -1 != $parsed_args['limit'] ) {
    310                 $query .= ' LIMIT ' . $parsed_args['limit'];
     310                $query .= ' LIMIT ' . absint( $parsed_args['limit'] );
    311311        }
    312312
  • branches/5.9/src/wp-includes/post-template.php

    r52204 r53964  
    10891089 * @since 1.2.0
    10901090 *
    1091  * @internal This will probably change at some point...
     1091 * @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually.
    10921092 */
    10931093function the_meta() {
     1094        _deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
    10941095        $keys = get_post_custom_keys();
    10951096        if ( $keys ) {
    … …  
    11071108                                "<li><span class='post-meta-key'>%s</span> %s</li>\n",
    11081109                                /* translators: %s: Post custom field name. */
    1109                                 sprintf( _x( '%s:', 'Post custom field name' ), $key ),
    1110                                 $value
     1110                                esc_html( sprintf( _x( '%s:', 'Post custom field name' ), $key ) ),
     1111                                esc_html( $value )
    11111112                        );
    11121113
Note: See TracChangeset for help on using the changeset viewer.