[wp-trac] [WordPress Trac] #16057: download_url() error checking fails to notice that the file wasnt correctly witten to disk

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 1 01:36:51 UTC 2011


#16057: download_url() error checking fails to notice that the file wasnt correctly
witten to disk
---------------------------+-----------------------------------------------
 Reporter:  dd32           |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Future Release
Component:                 |    Version:  3.0
  Upgrade/Install          |   Keywords:  has-patch needs-testing 3.2-early
 Severity:  normal         |
---------------------------+-----------------------------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16057>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list