maxattachmentsize = 0 means that you cannot attach any file to bugs

RESOLVED FIXED in Bugzilla 3.6

Status

()

Bugzilla
Attachments & Requests
--
minor
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: stefan.rank, Assigned: Frédéric Buclin)

Tracking

3.4.6
Bugzilla 3.6
Bug Flags:
approval +
approval3.6 +

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: 3.6

If I try to attach any file I'm getting the error "The file you are trying to attach is 40 kilobytes (KB) in size. Non-patch attachments cannot be more than 0 KB."

According to docementation maxattachmentsize 0 means: "subject to the limitations of your server software"

If I change maxattachmentsize to 4000 I can attach the file.

Reproducible: Always

Steps to Reproduce:
1. set maxattachmentsize to 0
2. attach a file
3. 
Actual Results:  
error "The file you are trying to attach is 40 kilobytes (KB) in size. Non-patch attachments cannot be more than 0 KB."

Expected Results:  
the file will was attached
(Assignee)

Comment 1

8 years ago
I'm going to reword the parameter description a bit to reflect what we do in the backend. If you set this parameter to 0, you won't be able to attach any file. "To accept attachments of any size" doesn't make sense. You never want to be able to attach a file of *any* size.
Assignee: attach-and-request → LpSolit
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.6
Version: unspecified → 3.4.6

Comment 2

8 years ago
No, it's valid to want to be able to attach attachments of any size--I mean, at some point the backend will limit it, won't it?

Of course, I suppose some people might not want 4G attachments in their PostgreSQL database--I think that could be a DoS. So looking at it from that viewpoint, you're right.
(Assignee)

Comment 3

8 years ago
You can set the parameter to allow 4 Gb attachments, if you are crazy enough. You just have to do it explicitly. For 3.8, I'm going to also hide the "Add an attachment" link in the attachment table when the param is 0, to not confuse users. For 3.6, I simply reword the param description.

Comment 4

8 years ago
Okay, although I don't think I've *ever* seen anybody request the ability to disable adding attachments--I wonder, would that just confuse people?
(Assignee)

Comment 5

8 years ago
(In reply to comment #4)
> Okay, although I don't think I've *ever* seen anybody request the ability to
> disable adding attachments--I wonder, would that just confuse people?

If the param is 0, the backend code doesn't let you add any attachment already. The front-end would now simply be consistent with what the backend code lets you do. It's not a new feature.

Comment 6

8 years ago
(In reply to comment #5)
> If the param is 0, the backend code doesn't let you add any attachment already.
> The front-end would now simply be consistent with what the backend code lets
> you do. It's not a new feature.

  Okay, that sounds reasonable.
(Assignee)

Comment 7

8 years ago
Created attachment 439969 [details] [diff] [review]
patch for tip, v1

Only backend code changes, besides a rewording of the param description. For 3.6, only the rewording of the param description applies. I won't alter the UI now that we are post-3.6.
Attachment #439969 - Flags: review?(mkanat)

Comment 8

8 years ago
Comment on attachment 439969 [details] [diff] [review]
patch for tip, v1

Looks great!
Attachment #439969 - Flags: review?(mkanat) → review+
(Assignee)

Updated

8 years ago
Flags: approval3.6+
Flags: approval+
(Assignee)

Comment 9

8 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/admin/params/attachment.html.tmpl
modified template/en/default/attachment/list.html.tmpl
modified template/en/default/bug/create/create.html.tmpl
Committed revision 7129.


Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/3.6/
modified template/en/default/admin/params/attachment.html.tmpl
Committed revision 7084.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Summary: cannot attach any file if maxattachmentsize is 0 → maxattachmentsize = 0 means that you cannot attach any file to bugs

Updated

8 years ago
Duplicate of this bug: 560773
You need to log in before you can comment on or make changes to this bug.