Go to file
Ian Dunn a1fe96576f Privacy: Add cron to delete expired export files to protect privacy.
The primary means of protecting the files is the CSPRN appended to the filename, but there is no reason to keep the files after the data subject has downloaded them, so deleting them provides an additional layer of protection. Previously this was done from `wp_privacy_generate_personal_data_export_file()`, but that does not guarantee that it will be run regularly, and on smaller sites that could result in export files being exposed for much longer than necessary.

`wp_privacy_delete_old_export_files()` was moved to a front end file, so that it can be called from `cron.php`.

This introduces the `wp_privacy_export_expiration` filter, which allows plugins to customize how long the exports are kept before being deleted.

`index.html` was added to the `$exclusions` parameter of `list_files()` to make sure that it isn't deleted. If it were, then poorly-configured servers would allow the directory to be traversed, exposing all of the exported files.

Props iandunn, desrosj.
See #43546.


git-svn-id: https://develop.svn.wordpress.org/trunk@43046 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 20:08:37 +00:00
src Privacy: Add cron to delete expired export files to protect privacy. 2018-04-30 20:08:37 +00:00
tests General: Introduce a polyfill for `is_iterable()` function added in PHP 7.1. 2018-04-30 04:14:30 +00:00
tools/i18n Remove the `svn:executable` property from files that don't need it. 2017-11-17 02:57:27 +00:00
.editorconfig General: Instruct file editors not to trim trailing whitespace in markdown files. 2018-03-20 22:14:53 +00:00
.gitignore Build/Test Tools: Remove `vendor` file name entry from `.gitignore`. 2018-02-25 11:29:25 +00:00
.jshintrc General: Remove `.jshintrc` and `*.json` from the 2-space-indent `.editorconfig` group. 2017-10-12 01:57:45 +00:00
.travis.yml BUILD/TEST TOOLS: Report Travis test results to make/hosting PHPUnit test results 2018-01-16 20:28:42 +00:00
Gruntfile.js Media: Update minified version of imgAreaSelect after [42874]. 2018-04-03 19:45:39 +00:00
composer.json Build Tools: Update the description in package.json and composer.json. 2018-04-05 07:15:25 +00:00
composer.lock Build Tools: Add a composer.json for development environments. 2018-04-05 07:04:08 +00:00
jsdoc.conf.json Docs: Improve wp-admin JSDoc structural data globally. 2017-12-15 13:41:56 +00:00
package.json Wow. I really shouldn't try to fix the build. 2018-04-19 00:25:52 +00:00
phpcs.xml.dist Build/Test Tools: Don't trigger the global variable override PHPCS sniff for core. 2018-04-28 00:44:50 +00:00
phpunit.xml.dist Build/Test Tools: Allow code coverage reports to be generated. 2018-02-07 22:20:25 +00:00
webpack.config.dev.js Build: Webpack instead of Browserify as JavaScript bundler. 2017-10-04 21:00:15 +00:00
webpack.config.prod.js Build: Webpack instead of Browserify as JavaScript bundler. 2017-10-04 21:00:15 +00:00
wp-cli.yml Remove debug mode from WP-CLI by default, as it now outputs too much debugging information to be of use during normal development. 2015-11-28 18:36:06 +00:00
wp-config-sample.php Code is Poetry. 2017-11-30 23:09:33 +00:00
wp-tests-config-sample.php Code is Poetry. 2017-11-30 23:09:33 +00:00