Red Hat Bugzilla – Bug 993445
User can successfully upload a txt file that doesn't exist
Last modified: 2015-01-26 18:27:58 EST
Description of problem:
If, for whatever reason, a txt file is moved or deleted while an admin is in the process of uploading, the file is still created on the server sans content of the original file.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Have a txt file on system with some content, echo "Blah whatever" >testfile.txt
2. Sign in as admin/maintainer
3. Go to a project, project version
4. Go to Source Documents, select Upload Document
5. Click browse, navigate to and select the testfile.txt
6. With the Upload dialog still in view, move or delete the testfile.txt
7. Press Upload
File is uploaded. Downloading this file results in an empty file being received.
This seems to occur only on Chrome and with a specific set of profile settings in Firefox. Pressing Upload in Firefox seemingly has no action other than a page reload.
Fixed by https://github.com/zanata/zanata-server/commit/5b76932142d18da8ab16a5d4a08acbd58d72ed37
Since the multi-file upload dialog is only used in one of a few upload locations, I suspect that commit may not completely fix this issue. Am I mistaken about this?
I think the other instances are handled differently.