WordPress.org

Make WordPress Core

Ticket #10224: 10224.diff

File 10224.diff, 524 bytes (added by Denis-de-Bernardy, 5 years ago)
  • wp-admin/includes/file.php

     
    167167function wp_tempnam($filename = '', $dir = ''){ 
    168168        if ( empty($dir) ) 
    169169                $dir = get_temp_dir(); 
    170         $filename = basename($filename); 
    171         if ( empty($filename) ) 
    172                 $filename = time(); 
     170        $filename = md5($filename . time()) . '.tmp'; 
    173171 
    174172        $filename = $dir . wp_unique_filename($dir, $filename); 
    175173        touch($filename);