Make WordPress Core

Changeset 53970 for branches/5.3


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

Grouped backports to the 5.3 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.3 branch.
Props tykoted, martinkrcho, xknown, dd32, peterwilsoncc, paulkevan, timothyblynjacobs.

Location:
branches/5.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/composer.json

    r51845 r53970  
    2020        "yoast/phpunit-polyfills": "^1.0.1"
    2121    },
     22    "config": {
     23        "allow-plugins": {
     24            "dealerdirect/phpcodesniffer-composer-installer": true
     25        }
     26    },
    2227    "scripts": {
    2328        "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",
  • branches/5.3/src/wp-admin/plugins.php

    r45932 r53970  
    489489            __( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
    490490            '<code>' . esc_html( $plugin_file ) . '</code>',
    491             $error->get_error_message()
     491            esc_html( $error->get_error_message() )
    492492        );
    493493        echo '</p></div>';
     
    549549                    /* translators: %s: Error message. */
    550550                    __( 'Plugin could not be deleted due to an error: %s' ),
    551                     $delete_result->get_error_message()
     551                    esc_html( $delete_result->get_error_message() )
    552552                );
    553553                ?>
  • branches/5.3/src/wp-includes/bookmark.php

    r46152 r53970  
    307307    $query .= " ORDER BY $orderby $order";
    308308    if ( $parsed_args['limit'] != -1 ) {
    309         $query .= ' LIMIT ' . $parsed_args['limit'];
     309        $query .= ' LIMIT ' . absint( $parsed_args['limit'] );
    310310    }
    311311
  • branches/5.3/src/wp-includes/post-template.php

    r46451 r53970  
    10821082 * @since 1.2.0
    10831083 *
    1084  * @internal This will probably change at some point...
     1084 * @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually.
    10851085 */
    10861086function the_meta() {
     1087    _deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
    10871088    $keys = get_post_custom_keys();
    10881089    if ( $keys ) {
     
    11001101                "<li><span class='post-meta-key'>%s</span> %s</li>\n",
    11011102                /* translators: %s: Post custom field name. */
    1102                 sprintf( _x( '%s:', 'Post custom field name' ), $key ),
    1103                 $value
     1103                esc_html( sprintf( _x( '%s:', 'Post custom field name' ), $key ) ),
     1104                esc_html( $value )
    11041105            );
    11051106
Note: See TracChangeset for help on using the changeset viewer.