Red Hat Bugzilla – Bug 1013688
No warning when attachment is not readable
Last modified: 2013-09-30 20:56:03 EDT
Description of problem:
I tried to submit an attachment without read permissions and bugzilla didn't show any warning about it. Clicking Submit didn't produce any action and I had to figure out on my own where the problem was.
It's a regression as bugzilla used to inform when it wasn't able to submit the attachment.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Try to submit an attachment without read permissions
Bugzilla warns that the attachment cannot be submitted.
I can reproduce this problem. If I create an unreadable file with "touch foo.txt ; chmod 200 foo.txt" then try to submit it as an attachment, nothing seems to happen when I press the Submit button.
If I subsequently "chmod 600 foo.txt" then press the Submit button again, the broswer loads attachment.cgi, which shows the following error message: "The file you are trying to attach is empty, does not exist, or you don't have permission to read it."
This message presumably occurs because the file I created is now readable but empty. I would have expected that the same thing should happen when the file is unreadable.
After a little more investigation, I think this is caused by a change in your browser rather than a regression in Red Hat Bugzilla.
Using Firefox 23.0.1, I see the behaviour described in Comment #1. Using Konqueror 4.11.1, I see the "The file you are trying to attach is empty, does not exist, or you don't have permission to read it." error message both when the file is unreadable and when it is empty.
Konqueror appears to be submitting an empty file in both cases, while Firefox is silently refusing to submit the form when the file is unreadable.
The Firefox behaviour does seem rather unhelpful and really should tell the user that the file cannot be submitted. Therefore, I suggest that you file a bug against Firefox via https://bugzilla.mozilla.org/enter_bug.cgi#h=dupes|Firefox