WordPress.org

Make WordPress Core

Ticket #2802: wp_handle_upload-file-permissions-patch.diff

File wp_handle_upload-file-permissions-patch.diff, 459 bytes (added by Libertus, 9 years ago)

the patch

  • wp-admin/admin-functions.php

     
    18871887 
    18881888        // Set correct file permissions 
    18891889        $stat = stat(dirname($new_file)); 
    1890         $perms = $stat['mode'] & 0000666; 
     1890        $perms = $stat['mode'] & 0664; // never executable, never world-writable 
    18911891        @ chmod($new_file, $perms); 
    18921892 
    18931893        // Compute the URL