Make WordPress Core

Changeset 40465


Ignore:
Timestamp:
04/17/2017 01:21:09 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.2 branch.

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

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

    r40154 r40465  
    28972897            foreach ( $data[$version]['comments'] as $key => $list ) {
    28982898                if ( 'length' !== $key && ! empty( $list ) ) {
    2899                     $metadata[$key] = reset( $list );
     2899                    $metadata[$key] = wp_kses_post( reset( $list ) );
    29002900                    // Fix bug in byte stream analysis.
    29012901                    if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
     
    29812981    wp_add_id3_tag_data( $metadata, $data );
    29822982
    2983     $metadata = wp_kses_post_deep( $metadata );
    2984 
    29852983    return $metadata;
    29862984}
     
    30223020    wp_add_id3_tag_data( $metadata, $data );
    30233021
    3024     $metadata = wp_kses_post_deep( $metadata );
    3025 
    30263022    return $metadata;
    30273023}
Note: See TracChangeset for help on using the changeset viewer.