logo       

[bug] file_check_upload allows empty uploads: msg#01019

php.drupal.devel

Subject: [bug] file_check_upload allows empty uploads

Project: Drupal
Version: cvs
Component: base system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: walkah
Updated by: walkah
Status: patch
Attachment: http://drupal.org/files/issues/file_check_upload.patch (778 bytes)

file_check_upload returns successfully when an empty file is uploaded.
this causes an error in getimagesize() (for example in profile.module's
avatar code). to reproduce: using profile module with avatars enabled,
enter 'xx' in the file upload box and submit the form. the getimagesize
error will be reported since it can't process the file.

the attached one-liner just checks to see that the uploaded file is in
fact non empty.

walkah

--
View: http://drupal.org/node/view/6103
Edit: http://drupal.org/project/comments/add/6103





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise