Make WordPress Core

Changeset 40462


Ignore:
Timestamp:
04/17/2017 01:14:01 PM (8 years ago)
Author:
swissspidy
Message:

Fix broken audio/video functions when sanitizing ID3 data

This fixes a bug where running wp_kses_post_deep() on all the ID3
tag data corrupted blob data.

See #40075, #40085.

Merges [40400] to the 4.5 branch.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/src/wp-admin/includes/media.php

    r40151 r40462  
    29522952            foreach ( $data[$version]['comments'] as $key => $list ) {
    29532953                if ( 'length' !== $key && ! empty( $list ) ) {
    2954                     $metadata[$key] = reset( $list );
     2954                    $metadata[$key] = wp_kses_post( reset( $list ) );
    29552955                    // Fix bug in byte stream analysis.
    29562956                    if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
     
    30423042    wp_add_id3_tag_data( $metadata, $data );
    30433043
    3044     $metadata = wp_kses_post_deep( $metadata );
    3045 
    30463044    return $metadata;
    30473045}
     
    30893087    wp_add_id3_tag_data( $metadata, $data );
    30903088
    3091     $metadata = wp_kses_post_deep( $metadata );
    3092 
    30933089    return $metadata;
    30943090}
Note: See TracChangeset for help on using the changeset viewer.