unreadable file form upload submits as empty file

Bug #152038 reported by Ian Jackson
4
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Triaged
Medium
Unassigned
xulrunner-1.9 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: firefox

From testing of gutsy amd64 dvd 20071010.2:

I attempted to attach /var/log/installer/syslog directly to a bug report, from a firefox running as my normal user account.

firefox evidently attempted to read the file and couldn't (because it wasn't readable to me) and decided therefore that the right thing to do was to send Launchpad an empty file as the attachment.

Launchpad spotted this problem and reported "Cannot upload empty file", but not all web applications will do this.

firefox needs to notify the user about problems opening and reading files, and to not submit incomplete forms or forms with incomplete files.

Tags: iso-testing
Revision history for this message
Ian Jackson (ijackson) wrote :

I have set the severity to High because this bug might cause data loss.

Changed in firefox:
importance: Undecided → High
Revision history for this message
Austin Lund (austin-lund) wrote :

Well I can confirm this on 7.10.

It is probably a fundamental part of firefox that hasn't been tested much. Will Hardy come with Firefox 3? Perhaps this will be gone by time this version comes around.

Changed in firefox:
status: New → Confirmed
Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 152038] Re: unreadable file form upload submits as empty file

On Sun, Jan 13, 2008 at 09:12:53PM -0000, Austin wrote:
> Well I can confirm this on 7.10.
>
> It is probably a fundamental part of firefox that hasn't been tested
> much. Will Hardy come with Firefox 3? Perhaps this will be gone by
> time this version comes around.
>

please test with firefox-3.0 (aka xulrunner-1.9) ... this won't be
fixed in ffox 2.

 affects ubuntu/firefox
 status wontfix
 affects ubuntu/xulrunner-1.9
 status incomplete

 - Alexander

Changed in firefox:
status: Confirmed → Won't Fix
Revision history for this message
Austin Lund (austin-lund) wrote :

I get it "Cannot upload empty file" with FF 3b5 in Hardy.

Revision history for this message
Alexander Sack (asac) wrote :

On Thu, May 08, 2008 at 11:12:44AM -0000, Austin wrote:
> I get it "Cannot upload empty file" with FF 3b5 in Hardy.
>

thanks

 affects ubuntu/xulrunner-1.9
 status confirmed

 - Alexander

Changed in xulrunner-1.9:
status: Incomplete → Confirmed
Revision history for this message
In , Cmsj-bugzilla (cmsj-bugzilla) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020518 Ubuntu/9.04 (jaunty) Firefox/3.0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020518 Ubuntu/9.04 (jaunty) Firefox/3.0.6

If one is trying to upload a file to a web site and one is unable to read that file (e.g. one does not have permissions to do so), Firefox will not display an error message, it will simply upload the file as 0 bytes, which may confuse the web application.

Reproducible: Always

Steps to Reproduce:
1. Visit a site that accepts file uploads
2. Upload a file your user does not have permissions to read
3.
Actual Results:
Silent fail

Expected Results:
Noisy fail

Some have argued that this is a High/Critical bug since users could be silently uploading empty data over real data, and thus losing it.

Changed in firefox:
status: Unknown → New
Revision history for this message
In , David McKelvie (dmck-interactive) wrote :

I have noticed this issue as well.

Running Firefox 3.0.6 on Ubuntu Linux, the file upload browser lets me see
files that I have read permission to.

But if the file does not have world read permission then the upload silently
fails and sends a zero length file

Changed in firefox:
importance: Unknown → Medium
Revision history for this message
In , Deletesoftware+moz (deletesoftware+moz) wrote :

*** Bug 748239 has been marked as a duplicate of this bug. ***

Changed in firefox:
status: New → Confirmed
Revision history for this message
In , Thierry-vignaud (thierry-vignaud) wrote :

As for firefox 15 beta 6, firefox just silently fails.
Eg: trying to upload the unreadable file (eg: echo >test.txt;chmod 000 test.txt) result in nothing happening when cliking on submit (tested on bugzilla, webmail, ...)

I've reported a similar same issue in chromium and it was fixed : https://code.google.com/p/chromium/issues/detail?id=30850&can=1&q=vignaud&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS%20Area%20Feature%20Status%20Owner%20Summary

Revision history for this message
In , Deletesoftware+moz (deletesoftware+moz) wrote :

(In reply to thierry.vignaud from comment #3)
> As for firefox 15 beta 6, firefox just silently fails.
> Eg: trying to upload the unreadable file (eg: echo >test.txt;chmod 000
> test.txt) result in nothing happening when cliking on submit (tested on
> bugzilla, webmail, ...)

I think I‘ve seen the same about when I marked this NEW. Morph or WORKSFORME?

Revision history for this message
In , Thierry-vignaud (thierry-vignaud) wrote :

What about adding check wiht stat() and warn about unreadable files?

Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in xulrunner-1.9 (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Micah Gersten (micahg) wrote :

Reopening the Firefox task as this is now the source for firefox. A duplicate was recently reported upstream, so this appears to be current. Dropping to Medium to be in line with the upstream importance for now.

Changed in firefox (Ubuntu):
importance: High → Medium
status: Won't Fix → Triaged
Revision history for this message
In , Deletesoftware+moz (deletesoftware+moz) wrote :

*** Bug 918284 has been marked as a duplicate of this bug. ***

Changed in firefox:
status: Confirmed → Unknown
Changed in firefox:
status: Unknown → Confirmed
Changed in firefox:
importance: Medium → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.