[wp-trac] [WordPress Trac] #30945: WP_Upgrader: Incorrect plugin folder after updating from remote (non-WP) URL

WordPress Trac noreply at wordpress.org
Thu Jan 8 03:13:39 UTC 2015


#30945: WP_Upgrader: Incorrect plugin folder after updating from remote (non-WP)
URL
-------------------------------+------------------------------
 Reporter:  miyarakira         |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Plugins            |     Version:  4.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by dd32):

 > I attached an example of a zip file in the second format (I believe). It
 throws an error during install: "Plugin contains no files". But it does -
 you can extract the files just like the first format.

 The folder name in the ZIP is invalid, the files are stored as
 `../readme.txt` instead of `plugin-slug/readme.txt`, which you can check
 on the command line with `unzip -l file.zip`, so the `../` is being
 striped during decompression.

 Originally there's a reason why it respects the foldername in the zip
 archive, it was originally designed that if you'd installed a plugin in
 `plugins/some-fancy-plugin-slug`, but it was `plugin-slug` on
 WordPress.org, that it would remove `plugins/some-fancy-plugin-slug` and
 instead put it into `plugins/plugin-slug`.
 Switching it to use the existing directory, when it's going to use a
 temporary folders filename during update seems like a valid solution
 though.

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


More information about the wp-trac mailing list