Open Bug 185863 Opened 22 years ago Updated 2 years ago

file upload improperly formatted when file contains double quotes

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
FreeBSD
defect

Tracking

()

Future

People

(Reporter: jflemer, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020817
Build Identifier: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020817

Files with double quotes in them get uploaded incorrectly becuase the quotes are
not URL encoded(?).  Below is a network capture from uploading a file with one
double quote in it (foo"bar.txt).  Netscape 4.79 displays same behavior; IE and
other browsers not tested.

-----------------------------175511881814879765632003026736
Content-Disposition: form-data; name="filename"; filename="foo"bar.txt"
Content-Type: text/plain

...data...

Reproducible: Always

Steps to Reproduce:
1. Upload a file with double quotes in it.

Actual Results:  
Web server considers the file to be simply 'foo' not 'foo"bar.txt'.  Perhaps
mozilla is doing The Right Thing, and the web server is broken, but it seems
that the filename should be URL encoded.

Expected Results:  
filename="foo%22bar.txt"

http://www.ietf.org/rfc/rfc1867.txt  File Upload
http://www.ietf.org/rfc/rfc1521.txt  MIME
http://www.ietf.org/rfc/rfc1522.txt  MIME
-> form submission
Assignee: darin → alexsavulov
Component: Networking: HTTP → Form Submission
QA Contact: httpqa → vladimire
Confirming, even though this is very minor. You should not name files with
quotes in the names anyways, and this is a good example why. 
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Target Milestone: --- → Future
Assignee: alexsavulov → form-submission
QA Contact: vladimire → ian
Since all modern file systems support quotes in filenames, Firefox should do.  You cant explain to a user that he or she "shouldnt" use them.  
Assignee: form-submission → nobody
QA Contact: ian → form-submission
It looks to me like this bug has been "fixed": The latest Firefox I tested *does* quote double quotes. However, there are still bugs in the file name quoting that make it less useful (see bug 185863). However, I propose that this bug could probably be closed.
Oops, sorry for the circular reference. I meant see bug 136676
Component: HTML: Form Submission → DOM: Core & HTML
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.