WordPress.org

Make WordPress Core

Changeset 40461


Ignore:
Timestamp:
04/17/2017 01:06:47 PM (2 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.6 branch.

Location:
branches/4.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6

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

    r40150 r40461  
    29652965            foreach ( $data[$version]['comments'] as $key => $list ) {
    29662966                if ( 'length' !== $key && ! empty( $list ) ) {
    2967                     $metadata[$key] = reset( $list );
     2967                    $metadata[$key] = wp_kses_post( reset( $list ) );
    29682968                    // Fix bug in byte stream analysis.
    29692969                    if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
     
    30553055    wp_add_id3_tag_data( $metadata, $data );
    30563056
    3057     $metadata = wp_kses_post_deep( $metadata );
    3058 
    30593057    return $metadata;
    30603058}
     
    31023100    wp_add_id3_tag_data( $metadata, $data );
    31033101
    3104     $metadata = wp_kses_post_deep( $metadata );
    3105 
    31063102    return $metadata;
    31073103}
Note: See TracChangeset for help on using the changeset viewer.