[wp-trac] [WordPress Trac] #30476: Plugin installation via URL appends .tmp to the plugin directory in some cases

WordPress Trac noreply at wordpress.org
Mon Nov 24 12:16:00 UTC 2014


#30476: Plugin installation via URL appends .tmp to the plugin directory in some
cases
-----------------------------+-----------------------------
 Reporter:  Briareos         |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  4.0.1
 Severity:  normal           |   Keywords:
  Focuses:  administration   |
-----------------------------+-----------------------------
 When the plugin content is in the root of the a zip file and when
 installing the plugin via remote URL, the extracted plugin will be
 installed like `wp-content/plugins/example.tmp/example.php`, because
 `download_url` function will download it as `/tmp/example.tmp` and the
 installer later won't strip the `.tmp` like it does with `.zip` at line
 `156` of `wp-admin/includes/class-wp-upgrader.php`.

 It's not exactly a bug, but removing the `.tmp` suffix would improve the
 installer.

 I've attached the code snippet to reproduce the issue (it's enough to run
 `php test.php` while in a clean WordPress installation).

 Expected behavior:
 plugin is installed as `wp-content/plugins/example/example.php`

 Current behavior:
 plugin is installed as `wp-content/plugins/example.tmp/example.php`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30476>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list