Make WordPress Core

Ticket #43908: 43908.2.diff

File 43908.2.diff, 1.0 KB (added by xkon, 8 years ago)
  • wp-admin/includes/file.php

     
    20422042        $obscura              = wp_generate_password( 32, false, false );
    20432043        $file_basename        = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura;
    20442044        $html_report_filename = $file_basename . '.html';
    2045         $html_report_pathname = $exports_dir . $html_report_filename;
     2045        $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
    20462046        $file = fopen( $html_report_pathname, 'w' );
    20472047        if ( false === $file ) {
    20482048                wp_send_json_error( __( 'Unable to open export file (HTML report) for writing' ) );
     
    21602160
    21612161        // Save the export file in the request.
    21622162        update_post_meta( $request_id, '_export_file_url', $archive_url );
    2163         update_post_meta( $request_id, '_export_file_path', $archive_pathname );
     2163        update_post_meta( $request_id, '_export_file_path', wp_normalize_path( $archive_pathname ) );
    21642164}
    21652165
    21662166/**