From cbc0240cd6fa176188eeb732bba7e3099118e1a7 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 9 Apr 2019 00:04:50 +0000 Subject: [PATCH] Privacy: Only mark a personal data export as complete when the user downloads it. An admin may download an export to check that it's all correct, but this action shouldn't mark the request as complete. Props garrett-eclipse, JoshuaWold, birgire. Fixes #44644. Built from https://develop.svn.wordpress.org/trunk@45148 git-svn-id: http://core.svn.wordpress.org/trunk@44957 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 435f6572a4..82d722b53d 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -2550,6 +2550,9 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde if ( is_wp_error( $mail_success ) ) { wp_send_json_error( $mail_success->get_error_message() ); } + + // Update the request to completed state when the export email is sent. + _wp_privacy_completed_request( $request_id ); } else { // Modify the response to include the URL of the export file so the browser can fetch it. $export_file_url = get_post_meta( $request_id, '_export_file_url', true ); @@ -2558,8 +2561,5 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde } } - // Update the request to completed state. - _wp_privacy_completed_request( $request_id ); - return $response; } diff --git a/wp-includes/version.php b/wp-includes/version.php index a619b15270..8c57c4fb4d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta1-45147'; +$wp_version = '5.2-beta1-45148'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.