Privacy: Ensure that exported user data reports can't be found with directory listings.

By moving from `.html` to `.php` files, we can prevent directory listings, and ensure that WordPress can load.

Fixes #52299.

Props lucasbustamante, xkon, freewebmentor, SergeyBiryukov, whyisjake. 


git-svn-id: https://develop.svn.wordpress.org/trunk@50037 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock
2021-01-27 23:45:29 +00:00
parent 448dd9d63c
commit a76f895146
4 changed files with 6 additions and 6 deletions
@@ -214,7 +214,7 @@ class Tests_Privacy_WpPrivacyGeneratePersonalDataExportFile extends WP_UnitTestC
}
/**
* Test that an index.html file can be added to the export directory.
* Test that an index.php file can be added to the export directory.
*
* @ticket 44233
*/
@@ -222,7 +222,7 @@ class Tests_Privacy_WpPrivacyGeneratePersonalDataExportFile extends WP_UnitTestC
$this->expectOutputString( '' );
wp_privacy_generate_personal_data_export_file( self::$export_request_id );
$this->assertTrue( file_exists( self::$exports_dir . 'index.html' ) );
$this->assertTrue( file_exists( self::$exports_dir . 'index.php' ) );
}
/**