[wp-trac] [WordPress Trac] #30121: wpmu_delete_blog function clears the whole uploads directory

WordPress Trac noreply at wordpress.org
Wed Oct 29 10:03:53 UTC 2014


#30121: wpmu_delete_blog function clears the whole uploads directory
--------------------------------+-------------------------
 Reporter:  katazina            |       Owner:  jeremyfelt
     Type:  defect (bug)        |      Status:  assigned
 Priority:  high                |   Milestone:  4.1
Component:  Networks and Sites  |     Version:  3.5
 Severity:  critical            |  Resolution:
 Keywords:  needs-patch         |     Focuses:  multisite
--------------------------------+-------------------------

Comment (by katazina):

 @jeremyfelt - thanks

 The first and simpliest thing to do is with javascript: disable or hide
 the confirm button after it is clicked.
 But in the `wpmu_delete_blog()` it is still necessary to check whether the
 blog exists or not.

 And should be also checked in the function that the `$blog_id` parameter
 is empty or not. I don't find anything what handles that.

 Also in the `$blog = get_blog_details( $blog_id );` line if the `$blog_id`
 is empty, then we got the current site in the `$blog` variable, which
 could be the "main or root" blog, so because of that and for other reasons
 it should be checked immediately after that line and not just later in
 line 88.

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


More information about the wp-trac mailing list