WordPress.org

Make WordPress Core

Changeset 40468


Ignore:
Timestamp:
04/17/17 13:33:25 (6 months 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 3.9 branch.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

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

    r40157 r40468  
    28602860            foreach ( $data[$version]['comments'] as $key => $list ) { 
    28612861                if ( ! empty( $list ) ) { 
    2862                     $metadata[$key] = reset( $list ); 
     2862                    $metadata[$key] = wp_kses_post( reset( $list ) ); 
    28632863                    // fix bug in byte stream analysis 
    28642864                    if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) ) 
     
    29442944    wp_add_id3_tag_data( $metadata, $data ); 
    29452945 
    2946     $metadata = wp_kses_post_deep( $metadata ); 
    2947  
    29482946    return $metadata; 
    29492947} 
     
    29852983    wp_add_id3_tag_data( $metadata, $data ); 
    29862984 
    2987     $metadata = wp_kses_post_deep( $metadata ); 
    2988  
    29892985    return $metadata; 
    29902986} 
Note: See TracChangeset for help on using the changeset viewer.