Make WordPress Core

Changeset 43234


Ignore:
Timestamp:
05/10/2018 09:11:00 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Normalize file paths in wp_privacy_generate_personal_data_export_file() to make sure Windows paths don't have their backslashes stripped.

Props xkon, pmbaldha.
Fixes #43908.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r43208 r43234  
    20492049    $file_basename        = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura;
    20502050    $html_report_filename = $file_basename . '.html';
    2051     $html_report_pathname = $exports_dir . $html_report_filename;
     2051    $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
    20522052    $file = fopen( $html_report_pathname, 'w' );
    20532053    if ( false === $file ) {
     
    21452145
    21462146        update_post_meta( $request_id, '_export_file_url', $archive_url );
    2147         update_post_meta( $request_id, '_export_file_path', $archive_pathname );
     2147        update_post_meta( $request_id, '_export_file_path', wp_normalize_path( $archive_pathname ) );
    21482148    }
    21492149
Note: See TracChangeset for help on using the changeset viewer.