Bug 1013688 - No warning when attachment is not readable
No warning when attachment is not readable
Product: Bugzilla
Classification: Community
Component: Attachments/Requests (Show other bugs)
Unspecified Unspecified
high Severity medium (vote)
: ---
: ---
Assigned To: PnT DevOps Devs
: Regression
Depends On:
  Show dependency treegraph
Reported: 2013-09-30 11:30 EDT by Jiri Koten
Modified: 2013-09-30 20:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-30 20:56:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiri Koten 2013-09-30 11:30:57 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):
version 4.4.0007-1

How reproducible:

Steps to Reproduce:
1. Try to submit an attachment without read permissions

Actual results:
Nothing happens

Expected results:
Bugzilla warns that the attachment cannot be submitted.

Additional info:
Comment 1 Jason McDonald 2013-09-30 20:32:59 EDT
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.
Comment 2 Jason McDonald 2013-09-30 20:56:03 EDT
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

Note You need to log in before you can comment on or make changes to this bug.