[wp-trac] [WordPress Trac] #30121: wpmu_delete_blog function clears the whole uploads directory
WordPress Trac
noreply at wordpress.org
Thu Nov 20 06:52:09 UTC 2014
#30121: wpmu_delete_blog function clears the whole uploads directory
--------------------------------+-------------------------
Reporter: katazina | Owner: jeremyfelt
Type: defect (bug) | Status: closed
Priority: high | Milestone: 4.1
Component: Networks and Sites | Version: 3.5
Severity: critical | Resolution: fixed
Keywords: has-patch | Focuses: multisite
--------------------------------+-------------------------
Changes (by jeremyfelt):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"30404"]:
{{{
#!CommitTicketReference repository="" revision="30404"
Prevent wpmu_delete_blog from removing the wrong uploads directory
`wp_upload_dir()` includes some logic to fall back to the default site's
upload directory if a specific directory for the requested site cannot be
found. Because of this, if `wpmu_delete_blog()` is fired twice in a row
for the same site, the main site's upload directory could be deleted as
well.
This adds some checks in `wpmu_delete_blog()` so that we are confident in
the site and it's upload directory's existence before dropping the site.
Tests are added for when `ms_files_rewriting` is enabled or disabled.
Fixes #30121
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30121#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list