Bug 111778
| Summary: | Empty file input is submitted incorrectly | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | michaeln |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Alexey Proskuryakov
When we are submitting an <input type=file> that does not have a file in it, we (correctly) send an empty file. But we do with two mistakes:
1) We create a File with an empty path, which is invalid. We should be using some other way to achieve this, such as perhaps an empty Blob.
2) The File is destroyed before the form is actually submitted, so BlobRegistry has to deal with an unregistered blob URL. The File is owned by DOMFormData, and that's destroyed at the end of FormSubmission::create(). So, a Blob or a File becomes unregistered in blob registry, and cannot be used when actually building form data stream in another process.
We should obviously keep uploaded objects alive while form submission takes place.
See also: bug 111687.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |