"Auto Detect" for attachment content type.

Benton, Kevin kevin.benton at amd.com
Thu Apr 6 16:02:25 UTC 2006


> On Wed, 2006-04-05 at 21:28 -0400, David Miller wrote:
> > byron jones wrote on 4/5/06 9:00 PM:
> > >>> buglist.cgi: -content_disposition => "$disp;
filename=$filename");
> > >> Just figured out there's a potential bug there - $filename should
> have
> > >> "'s around it.
> > >
> > > and encoded if it's more than 78 chars, or non-ascii.
> >
> > please research old bugs before touching this.
> >
> > It was broken on several browsers a year or two ago, and it got
> > researched the hell out of to find out how to do it right.  If it's
> > broken now, someone probably reverted it on accident.  Otherwise,
it's
> > likely the way it is now on purpose.
> 
> 	The way it is now is fine. :-) The line I pasted above is from
> buglist.cgi. *We* set all the filenames on buglist.cgi.
> 
> 	attachment.cgi does the exact right thing with user-supplied
> filenames.

I agree.  I tested it on http://landfill.bugzilla.org/bugzilla-tip/ in
bug 3686.  The attachment "Another Test" was stored as "This file.doc"
and Bugzilla transmitted the name back to me properly.  There is no need
to change Bugzilla in any way at this time.  It wouldn't be a bad idea
to include this as a regression test as part of the release criteria,
however.

My point in sharing this originally was to pass the info along to others
who may not have known how to do this before.  I didn't and hadn't
thought of looking at the attachment CGI code prior to learning how to
do this.

---
Kevin Benton
Perl/Bugzilla Developer/Administrator, Perforce SCM Administrator
AMD - ECSD Software Validation and Tools
 
The opinions stated in this communication do not necessarily reflect the
view of Advanced Micro Devices and have not been reviewed by management.
This communication may contain sensitive and/or confidential and/or
proprietary information.  Distribution of such information is strictly
prohibited without prior consent of Advanced Micro Devices.  This
communication is for the intended recipient(s) only.  If you have
received this communication in error, please notify the sender, then
destroy any remaining copies of this communication.





More information about the developers mailing list