Make WordPress Core


Ignore:
Timestamp:
05/16/2023 04:02:16 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Grouped backports to the 5.0 branch.

  • Media: Prevent CSRF setting attachment thumbnails.
  • Embeds: Add protocol validation for WordPress Embed code.
  • I18N: Introduce sanitization function for locale.
  • Editor: Ensure block comments are of a valid form.

Merges [55760-55764] to the 5.0 branch
Props dd32, isabel_brison, martinkrcho, matveb, ocean90, paulkevan, peterwilsoncc, timothyblynjacobs, xknown, youknowriad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/l10n.php

    r44419 r55791  
    140140
    141141    if ( ! empty( $_GET['wp_lang'] ) && ! empty( $GLOBALS['pagenow'] ) && 'wp-login.php' === $GLOBALS['pagenow'] ) {
    142         $determined_locale = sanitize_text_field( $_GET['wp_lang'] );
     142        $determined_locale = sanitize_locale_name( wp_unslash( $_GET['wp_lang'] ) );
    143143    }
    144144
Note: See TracChangeset for help on using the changeset viewer.