[wp-trac] Re: [WordPress Trac] #5586: Auto installer for themes and plugins

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 10 01:19:53 GMT 2008


#5586: Auto installer for themes and plugins
------------------------------------+---------------------------------------
 Reporter:  lawrencejob             |        Owner:  ryan 
     Type:  enhancement             |       Status:  new  
 Priority:  normal                  |    Milestone:  2.5  
Component:  Administration          |      Version:  2.3.1
 Severity:  normal                  |   Resolution:       
 Keywords:  installer theme plugin  |  
------------------------------------+---------------------------------------
Comment (by DD32):

 Just had a report that the upgrader deleted the entire /plugins/ folder,
 rather than just a subfolder.

 However, They cant reproduce, nor can i:
 {{{
 11:55   aaronjj hmm... tried to auto-upgrade a plugin and it deleted my
 entire /plugins/ folder.
 11:56   DD32[a] aaronjj: was the plugin in a folder? Or simply in
 /plugins/ ?
 11:57   aaronjj it was in a folder. it was the wp db backup plugin. I've
 been trying to recreate the error and everything is working fine now
         aaronjj DD32: it failed on the last step
 11:58   aaronjj         DD32[a]: using latest trunk downloaded from wp.org

                 DD32[a] changes nick to DD32
 11:59   DD32    Hm, Allright, Can you install this plugin,
 http://dd32.id.au/files/wp-filesystem-tester.zip activate it, and then
 send me the details from its page to wordpress at dd32.id.au ? I'd just like
 to check theres not a case i've missed
         aaronjj         DD32: sent. note that when the upgrade failed it
 left the /wp-content/upgrade/ folder behind with the new version of wp-db-
 backup

         DD32    allright, Thanks, i'll have a look at it and see if i can
 spot anything
 12:09           -> TelnetManta has joined wordpress
 12:11   DD32    aaronjj: hm, That all looks perfect to me. It doesnt
 supprise me that it worked afterwards, why it failed first time 'round..
 I'm not quite sure
 12:12   aaronjj         DD32: has that been an issue in the past? losing
 the entire /plugins/ folder?

 12:13   DD32    aaronjj: Its happened to me once, but i caught the reason
 for it, and the current upgrader is designed to catch the cases where it
 attempts to delete the entire plugins directory
 }}}

 However, I think there needs to be some extra checks that the folder its
 going to delete is valid, checking if its '.' or the main plugins
 directory aparantly doesnt work 100% (Else this person wouldnt've lost the
 entire directory).
 maybe a preg_match('|' . PLUGINSDIR . '/(.+)|') to make sure theres
 something after the plugins directory?

 Attaching a patch to raise an error if WP comes up against the problem
 that it cant locate a valid WordPress folder. (Unrelated to this problem,
 But if it cant locate the correct folder, it certainly shouldnt continue
 attempting to follow through)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5586#comment:45>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list