diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 4bec958b25..0e7bdb2a3c 100644
a
|
b
|
function wp_privacy_generate_personal_data_export_file( $request_id ) { |
2048 | 2048 | $obscura = wp_generate_password( 32, false, false ); |
2049 | 2049 | $file_basename = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura; |
2050 | 2050 | $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 ); |
2052 | 2052 | $file = fopen( $html_report_pathname, 'w' ); |
2053 | 2053 | if ( false === $file ) { |
2054 | 2054 | wp_send_json_error( __( 'Unable to open export file (HTML report) for writing.' ) ); |
… |
… |
function wp_privacy_generate_personal_data_export_file( $request_id ) { |
2144 | 2144 | $archive_url = $exports_url . $archive_filename; |
2145 | 2145 | |
2146 | 2146 | 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 ) ); |
2148 | 2148 | } |
2149 | 2149 | |
2150 | 2150 | if ( ! empty( $archive_pathname ) && file_exists( $archive_pathname ) ) { |