Opened 9 years ago
Closed 9 years ago
#18182 closed defect (bug) (fixed)
Upload installs of plugins/themes not cleaning up after themselves
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.2.2 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
Upload installs of plugins and themes are not removing the .zip file after installation.
To reproduce:
- Upload a zipped theme or plugin via Themes->Install->Upload or Plugins->Install->Upload.
- Check /wp-content/uploads and you should see the zip left over from install.
Attachments (1)
Change History (12)
#2
@
9 years ago
- Component changed from Upload to Upgrade/Install
- Owner set to dd32
- Status changed from new to reviewing
#3
@
9 years ago
- Milestone changed from Awaiting Review to 3.3
- Status changed from reviewing to accepted
- Version changed from 3.2.1 to 3.2
#4
@
9 years ago
Ultimately, The uploaded file shouldn't be moved to the uploads directory at all with the current uploader
Unfortunately, I was forgetting about FTP upgrades, the file needs to be uploaded and stored for the following request.
Previously if a user was to upload a theme, but not follow through with the install (ie. prompted for FTP details) the zip file wouldn't be deleted either.
Proposed patches:
- 3.2.x: Just clean up after ourselves after installing.
- 3.3: We should store uploaded items in the Media Library somehow, and as well as deleteing after installing, a cron job should clean up any non-installed items.
#9
@
9 years ago
- Milestone changed from 3.3 to 3.2.2
That needs to be (in part at least) applied to 3.2.x as well. Needs more testing on my end before the final 3.2.x patch is done.
#11
@
9 years ago
- Resolution set to fixed
- Status changed from accepted to closed
Calling this one as done for 3.2 and trunk.
- 3.2.2, 3.3: Clean up uploaded files after successful installations
- 3.2.2, 3.3: Clean up uploaded files after failed installations
- 3.3: Store uploads in the Media Library temporarily with the context flag set, Clean up any aborted(ie. see the FTP credentials page, and give up) installation files 2hours after install attempt.
Note: See
TracTickets for help on using
tickets.
This was caused by [17660] - which I thought I'd tested this code branch properly.
Ultimately, The uploaded file shouldn't be moved to the uploads directory at all with the current uploader, It appears to have been written with Ajax uploading in mind (Not sure that's something we really need for the plugin/theme uploaders).
The code that moves the file to the uploads directory just needs to be removed by looks of it, but i'll do some more testing.
Setting to 3.3 for now, Will need to go into the 3.2 branch as well.