WordPress.org

Make WordPress Core

Changeset 18022


Ignore:
Timestamp:
05/24/11 15:56:40 (3 years ago)
Author:
ryan
Message:

Make sure ext passes through sanitize_file_name()

Location:
branches/3.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1

  • branches/3.1/wp-app.php

    r16699 r18022  
    608608        $slug = ''; 
    609609        if ( isset( $_SERVER['HTTP_SLUG'] ) ) 
    610             $slug = sanitize_file_name( $_SERVER['HTTP_SLUG'] ); 
     610            $slug = $_SERVER['HTTP_SLUG']; 
    611611        elseif ( isset( $_SERVER['HTTP_TITLE'] ) ) 
    612             $slug = sanitize_file_name( $_SERVER['HTTP_TITLE'] ); 
     612            $slug = $_SERVER['HTTP_TITLE']; 
    613613        elseif ( empty( $slug ) ) // just make a random name 
    614614            $slug = substr( md5( uniqid( microtime() ) ), 0, 7); 
    615615        $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); 
    616         $slug = "$slug.$ext"; 
     616        $slug = sanitize_file_name( "$slug.$ext" ); 
    617617        $file = wp_upload_bits( $slug, NULL, $bits); 
    618618 
Note: See TracChangeset for help on using the changeset viewer.