Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#30476 closed enhancement (duplicate)

Plugin installation via URL appends .tmp to the plugin directory in some cases

Reported by: Briareos Owned by:
Priority: normal Milestone:
Component: Upgrade/Install Version: 4.0.1
Severity: normal Keywords:
Cc: Focuses: administration

Description

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

Attachments (1)

test.php (360 bytes ) - added by Briareos 12 years ago.
Script to run from a WordPress root to reproduce the issue

Download all attachments as: .zip

Change History (2)

@Briareos
12 years ago

Script to run from a WordPress root to reproduce the issue

#1 @dd32
11 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

This was fixed through #30945

Note: See TracTickets for help on using tickets.