Make WordPress Core

Changeset 53966


Ignore:
Timestamp:
08/30/2022 03:30:56 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Grouped backports to the 5.7 branch.

  • Posts, Post Types: Escape output within the_meta().
  • General: Ensure bookmark query limits are numeric.
  • Plugins: Escape output in error messages.
  • Build/Test Tools: Allow the PHPCS plugin in Composer configuration.

Merges [52412,53958-53960] to the 5.7 branch.
Props tykoted, martinkrcho, xknown, dd32, peterwilsoncc, paulkevan, timothyblynjacobs.

Location:
branches/5.7
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

  • branches/5.7/composer.json

    r51839 r53966  
    3434        ]
    3535    },
     36    "config": {
     37        "allow-plugins": {
     38            "dealerdirect/phpcodesniffer-composer-installer": true
     39        }
     40    },
    3641    "scripts": {
    3742        "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",
  • branches/5.7/src/wp-admin/plugins.php

    r49683 r53966  
    611611            __( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
    612612            '<code>' . esc_html( $plugin_file ) . '</code>',
    613             $error->get_error_message()
     613            esc_html( $error->get_error_message() )
    614614        );
    615615        echo '</p></div>';
     
    675675                    /* translators: %s: Error message. */
    676676                    __( 'Plugin could not be deleted due to an error: %s' ),
    677                     $delete_result->get_error_message()
     677                    esc_html( $delete_result->get_error_message() )
    678678                );
    679679                ?>
  • branches/5.7/src/wp-includes/bookmark.php

    r48591 r53966  
    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.7/src/wp-includes/post-template.php

    r50396 r53966  
    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.