[wp-trac] [WordPress Trac] #44038: Change personal data export path stored in request meta to relative paths

WordPress Trac noreply at wordpress.org
Tue Jan 7 17:58:54 UTC 2020


#44038: Change personal data export path stored in request meta to relative paths
------------------------------------------------+--------------------------
 Reporter:  allendav                            |       Owner:  (none)
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  5.4
Component:  Privacy                             |     Version:  4.9.6
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch dev-feedback 2nd-opinion  |     Focuses:
                                                |  administration
------------------------------------------------+--------------------------
Changes (by xkon):

 * keywords:  has-patch dev-feedback => has-patch dev-feedback 2nd-opinion


Comment:

 I've tested the [attachment:"44038.4.diff"] but it was generating extra
 .zip files for me in some instances depending on the if statements that
 are already present.

 [attachment:"44038.5.diff"] takes a different approach and removes all
 previous postmeta used for the files `_export_file_url` and
 `_export_file_path` while keeping/creating the new `_export_file_name`
 that .4 patch introduced.

 This way the database only keeps a filename and no records of hard
 paths/links at all so everything has to pass via the
 `wp_privacy_exports_dir()` & `wp_privacy_exports_url()` to build a full
 path and url which are following the `upload_dir()` so they should be
 fully filterable and updatable from installation to installation.

 We still need to get the  `_export_file_url` and `_export_file_path` via
 get_post_meta() for the sanity checks and to gradually move away from
 them.

 To test this:

 1] Add some random export requests ( no need to have actual data as the
 zips are getting generated either way ). On some, proceed to the download
 so the "original" postmeta can be created and on some others leave them as
 pending.

 2] Apply the patch and click on a Download Personal Data or send an e-mail
 etc normally.

 The database should be fully updated to use only `_export_file_name` and
 the links, as well as .zips, should be unique and generated properly
 without leaving any extra files or database trails to not-used .zips.


 I think that this gets everything on what @SergeyBiryukov proposed and it
 should be fully backward compatible due to the addition/removal of the
 postmeta on each case if I didn't miss anything :D.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44038#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list