Make WordPress Core

Changeset 40466


Ignore:
Timestamp:
04/17/2017 01:28:48 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.1 branch.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

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

    r40155 r40466  
    28942894            foreach ( $data[$version]['comments'] as $key => $list ) {
    28952895                if ( 'length' !== $key && ! empty( $list ) ) {
    2896                     $metadata[$key] = reset( $list );
     2896                    $metadata[$key] = wp_kses_post( reset( $list ) );
    28972897                    // Fix bug in byte stream analysis.
    28982898                    if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
     
    29782978    wp_add_id3_tag_data( $metadata, $data );
    29792979
    2980     $metadata = wp_kses_post_deep( $metadata );
    2981 
    29822980    return $metadata;
    29832981}
     
    30193017    wp_add_id3_tag_data( $metadata, $data );
    30203018
    3021     $metadata = wp_kses_post_deep( $metadata );
    3022 
    30233019    return $metadata;
    30243020}
Note: See TracChangeset for help on using the changeset viewer.