Make WordPress Core

Changeset 55790

Timestamp:
05/16/2023 04:01:50 PM (15 months ago)
Author:
audrasjb
Message:

Grouped backports to the 5.1 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.1 branch.
Props dd32, isabel_brison, martinkrcho, matveb, ocean90, paulkevan, peterwilsoncc, timothyblynjacobs, xknown, youknowriad.

Location:
branches/5.1
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • branches/5.1/package-lock.json

    r54593 r55790  
    11{
    22    "name": "WordPress",
    3     "version": "5.1.15",
     3    "version": "5.1.1",
    44    "lockfileVersion": 1,
    55    "requires": true,
  • branches/5.1/package.json

    r54593 r55790  
    11{
    22    "name": "WordPress",
    3     "version": "5.1.15",
     3    "version": "5.1.1",
    44    "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.",
    55    "repository": {
  • branches/5.1/src/js/_enqueues/wp/embed.js

    r43597 r55790  
    4545        var iframes = document.querySelectorAll( 'iframe[data-secret="' + data.secret + '"]' ),
    4646            blockquotes = document.querySelectorAll( 'blockquote[data-secret="' + data.secret + '"]' ),
     47
    4748            i, source, height, sourceURL, targetURL;
    4849
     
    7980                sourceURL.href = source.getAttribute( 'src' );
    8081                targetURL.href = data.value;
     82
     83
     84
     85
     86
    8187
    8288                /* Only continue if link hostname matches iframe's hostname. */
  • branches/5.1/src/js/media/views/frame/video-details.js

    r43309 r55790  
    107107            wp.ajax.send( 'set-attachment-thumbnail', {
    108108                data : {
     109
    109110                    urls: urls,
    110111                    thumbnail_id: attachment.get( 'id' )
  • branches/5.1/src/wp-admin/about.php

    r55381 r55790  
    3737        <div class="changelog point-releases">
    3838            <h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
    3959            <p>
    4060                <?php
  • branches/5.1/src/wp-admin/includes/ajax-actions.php

    r54570 r55790  
    25082508    }
    25092509
     2510
     2511
     2512
     2513
    25102514    $post_ids = array();
    25112515    // For each URL, try to find its corresponding post ID.
  • branches/5.1/src/wp-includes/blocks.php

    r46907 r55790  
    272272    $result = '';
    273273
     274
     275
     276
     277
    274278    $blocks = parse_blocks( $text );
    275279    foreach ( $blocks as $block ) {
     
    279283
    280284    return $result;
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
    281298}
    282299
  • branches/5.1/src/wp-includes/formatting.php

    r52472 r55790  
    23672367
    23682368/**
     2369
     2370
     2371
     2372
     2373
     2374
     2375
     2376
     2377
     2378
     2379
     2380
     2381
     2382
     2383
     2384
     2385
     2386
     2387
     2388
     2389
     2390
     2391
    23692392 * Converts lone & characters into `&#038;` (a.k.a. `&amp;`)
    23702393 *
  • branches/5.1/src/wp-includes/l10n.php

    r44514 r55790  
    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_ );
    143143    }
    144144
  • branches/5.1/src/wp-includes/media.php

    r44566 r55790  
    35843584        'captions'         => ! apply_filters( 'disable_captions', '' ),
    35853585        'nonce'            => array(
    3586             'sendToEditor' => wp_create_nonce( 'media-send-to-editor' ),
     3586            'sendToEditor'           => wp_create_nonce( 'media-send-to-editor' ),
     3587            'setAttachmentThumbnail' => wp_create_nonce( 'set-attachment-thumbnail' ),
    35873588        ),
    35883589        'post'             => array(
  • branches/5.1/src/wp-includes/version.php

    r54593 r55790  
    1414 * @global string $wp_version
    1515 */
    16 $wp_version = '5.1.15-src';
     16$wp_version = '5.1.1-src';
    1717
    1818/**
  • branches/5.1/tests/phpunit/tests/ajax/Attachments.php

    r42343 r55790  
    114114        $this->assertEquals( $expected, $response['data'] );
    115115    }
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
    116207}
Note: See TracChangeset for help on using the changeset viewer.