[wpmu-trac] [WordPress MU Trac] #727: serious error in wpmu_delete_blog, dropping tables not supposed to

WordPress MU Trac wpmu-trac at lists.automattic.com
Mon Aug 25 11:48:02 GMT 2008


#727: serious error in wpmu_delete_blog, dropping tables not supposed to
------------------------+---------------------------------------------------
 Reporter:  jeppe       |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  highest     |   Milestone:          
Component:  component1  |     Version:          
 Severity:  blocker     |    Keywords:          
------------------------+---------------------------------------------------
 Just got bitten by this.
 In wp-admin/includes/mu.php wpmu_delete_blog wpmu queries related tables
 with:

 show tables LIKE '". $wpdb->base_prefix . $blog_id . "_%'

 Because _ is a wildcard too, matching one character, deleting for example
 blog id 2 will drop all tables starting with 2...

 It should be escaped:

 show tables LIKE '". $wpdb->base_prefix . $blog_id . "\_%'

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/727>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list