Make WordPress Core

Changeset 43235


Ignore:
Timestamp:
05/10/2018 09:12:21 PM (7 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.
Merges [43234] to the 4.9 branch.
Fixes #43908.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/file.php

    r43209 r43235  
    19121912    $file_basename        = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura;
    19131913    $html_report_filename = $file_basename . '.html';
    1914     $html_report_pathname = $exports_dir . $html_report_filename;
     1914    $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
    19151915    $file = fopen( $html_report_pathname, 'w' );
    19161916    if ( false === $file ) {
     
    20082008
    20092009        update_post_meta( $request_id, '_export_file_url', $archive_url );
    2010         update_post_meta( $request_id, '_export_file_path', $archive_pathname );
     2010        update_post_meta( $request_id, '_export_file_path', wp_normalize_path( $archive_pathname ) );
    20112011    }
    20122012
Note: See TracChangeset for help on using the changeset viewer.