Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#30476 closed enhancement (duplicate)

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

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

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 10 years ago.
Script to run from a WordPress root to reproduce the issue

Download all attachments as: .zip

Change History (2)

@Briareos
10 years ago

Script to run from a WordPress root to reproduce the issue

#1 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

This was fixed through #30945

Note: See TracTickets for help on using tickets.