download_url() error checking fails to notice that the file wasnt correctly witten to disk
|Reported by:||dd32||Owned by:||dd32|
|Component:||HTTP API||Keywords:||3.3-early has-patch needs-testing commit|
When upgrading/installing plugins, themes and WordPress download_url() is called to download the package to a temporary file.
At present, the return value of fwrite() is not checked, the result can be that the file is not written to disk correctly and subsequently, the Zip extraction fails.
This appears as if it can be caused by the user running out of disk space, as seen here: http://erisds.co.uk/wordpress/wordpress-automatic-upgrades-one-of-the-pitfalls
I'm attaching a patch which appears to fix it for me, however, As I do not have a setup where I can enforce a quota I cannot test the saving of the file without fudging the return value of fwrite() to something lower than expected.
Change History (24)
- Keywords needs-refresh added; has-patch needs-testing removed
- Owner set to dd32
- Status changed from new to assigned
comment:13 dd32 — 10 months ago
- Component changed from Upgrade/Install to HTTP
- Keywords has-patch needs-testing commit added; needs-refresh removed