Closed Bug 588414 Opened 14 years ago Closed 13 years ago

Content-Disposition: RFC 2231 continuation parameters not accepted when unordered

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 384571

People

(Reporter: julian.reschke, Unassigned)

References

(Blocks 1 open bug, )

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)

Given

  Content-Disposition: attachment; filename*1="bar"; filename*0="foo"

the recipient should bring the continuation parameters into the right order, resulting in a filename of "foobar".

Reproducible: Always

Steps to Reproduce:
1. Run test at http://greenbytes.de/tech/tc2231/#attfncontord
2.
3.
Actual Results:  
Parser apparently fails, FF continues as if the parameters were absent

Expected Results:  
Should detect a filename of "foobar"

Of the browsers supporting RFC 2231 (Konq/Opera/FF), Firefox is the only one to get this wrong.
Component: General → File Handling
Product: Firefox → Core
QA Contact: general → file-handling
I probably should add that continuation parameters probably aren't used in practice, nor defined in RFC 5789 (which now defines the use of 2231 encoding on HTTP), thus the simplest possible fix would be to remove the support for continuations altogether.
This code is shared by HTTP and mail.  Are they also unused in mail?
Status: UNCONFIRMED → NEW
Ever confirmed: true
nsMIMEHeaderParamImpl::GetParameterInternal would need to build up an array of continuations and then concatenate them instead of appending in place.  Man, is that code ugly.  :(
Component: File Handling → Networking
QA Contact: file-handling → networking
(In reply to comment #2)
> This code is shared by HTTP and mail.  Are they also unused in mail?

They might be used in mail. Is the module really shared?

(In reply to comment #3)
> nsMIMEHeaderParamImpl::GetParameterInternal would need to build up an array of
> continuations and then concatenate them instead of appending in place.  Man, is
> that code ugly.  :(

It is. I'm tempted to offer a complete rewrite without quirks, but that would probably be hard to deploy. So instead I'm trying to get it improved (simplified) in smaller steps.
> Is the module really shared?

Yes.
Blocks: 609667
OS: Windows 7 → All
Hardware: x86 → All
This seems to be the same as bug 384571. Can I close this one as duplicate after fixing the component on 384571?
Sure.  Or dup that one forward to here if there's more relevant discussion in this bug.
Bug 384571 has more historical information, so marking this one a duplicate.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.