Closed
Bug 653404
Opened 13 years ago
Closed 13 years ago
Misleading error message when file to be attached is not readable by browser
Categories
(Bugzilla :: Attachments & Requests, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: sascha.schwedes, Assigned: LpSolit)
References
Details
Attachments
(2 files)
1.06 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
870 bytes,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Build Identifier: 3.6.3 When you try to attach a file for that your browser doesn't have read permissions, you get misleading error messages that even depend on the content-type you've selected. Reproducible: Always Steps to Reproduce: 1. Create an attachment using a file your browser doesn't have read permissions 2. Add a description 3. Click on "Submit" Actual Results: The exact error message depends on the content type choosing mechanism. If you select to autodetect the mime type, bugzilla says you didn't specify a file. If you choose "text/plan", you get the following message: The function Bugzilla::Attachment->create requires a description argument, and that argument was not set. Expected Results: An error message saying "don't have the permission to attach this file" for all content-type settings. See also Bug 389844
Assignee | ||
Comment 1•13 years ago
|
||
Ah, this would explain why some users had this error in the past. Thanks for the bug! :) Bug 389844 is unrelated. It's just about improving the error message. Here, the root cause is different.
Severity: enhancement → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86_64 → All
See Also: 389844 →
Target Milestone: --- → Bugzilla 4.0
Assignee | ||
Comment 2•13 years ago
|
||
We first have to store the filehandle in a variable before passing it to create().
Assignee | ||
Comment 3•13 years ago
|
||
Same patch as for trunk, but the patch for 4.2 doesn't apply cleanly due to an unrelated change in the neighbourhood.
Attachment #528832 -
Flags: review?(glob)
Assignee | ||
Updated•13 years ago
|
Attachment #528830 -
Attachment description: patch for 4.2 → patch for 4.2, v1
Comment on attachment 528832 [details] [diff] [review] patch for 4.0, v1 Review of attachment 528832 [details] [diff] [review]: r=glob
Attachment #528832 -
Flags: review?(glob) → review+
Assignee | ||
Updated•13 years ago
|
Flags: approval4.0+
Flags: approval+
Assignee | ||
Comment 6•13 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified attachment.cgi Committed revision 7804. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/ modified attachment.cgi Committed revision 7589.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•