Last Comment Bug 730574 - Content-Disposition: quoted-string in RFC2231-continuations not handled
: Content-Disposition: quoted-string in RFC2231-continuations not handled
Status: RESOLVED FIXED
:
Product: Core Graveyard
Classification: Graveyard
Component: File Handling (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Julian Reschke
:
Mentors:
http://greenbytes.de/tech/tc2231/#att...
Depends on:
Blocks: 609667
  Show dependency treegraph
 
Reported: 2012-02-25 07:36 PST by Julian Reschke
Modified: 2016-06-22 12:16 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Proposed patch, incl test case (4.11 KB, patch)
2012-05-08 13:12 PDT, Julian Reschke
jduell.mcbugs: review+
Details | Diff | Splinter Review
Proposed patch, incl test case (4.10 KB, patch)
2012-05-28 05:15 PDT, Julian Reschke
jduell.mcbugs: review+
Details | Diff | Splinter Review

Description Julian Reschke 2012-02-25 07:36:57 PST
When processing continuation parameters using RFC2231 encoding, backslash-escapes in quoted-string values are not processed.

See test case at http://greenbytes.de/tech/tc2231/#attfncontqs

This is similar to bug 588389, which however wasn't about continuation parameters, and didn't fix these.
Comment 1 Julian Reschke 2012-05-08 13:12:02 PDT
Created attachment 622106 [details] [diff] [review]
Proposed patch, incl test case

try results: https://tbpl.mozilla.org/?tree=Try&rev=2fec6a7618fe
Comment 2 Jason Duell [:jduell] (needinfo me) 2012-05-25 15:53:20 PDT
Comment on attachment 622106 [details] [diff] [review]
Proposed patch, incl test case

Review of attachment 622106 [details] [diff] [review]:
-----------------------------------------------------------------

+r with nits fixed.

::: netwerk/mime/nsMIMEHeaderParamImpl.cpp
@@ +271,1 @@
>  

no space between cont and (

::: netwerk/test/unit/test_MIME_params.js
@@ +394,5 @@
> +  // unmatched escape char
> +  ["attachment; filename=basic; filename*0=\"foo\"; filename*1=\"\\b\\a\\", 
> +   "attachment", "fooba\\",
> +   "attachment", "basic"],
> +

These would be easier to read if you just make the overall strings single-quoted, so you don't have to escape double quotes in them.
Comment 3 Julian Reschke 2012-05-26 02:05:54 PDT
Thanks for the feedback; will update in time for FF16 :-)
Comment 4 Julian Reschke 2012-05-28 05:15:04 PDT
Created attachment 627672 [details] [diff] [review]
Proposed patch, incl test case

Did the syntactical fixes. Try result at https://tbpl.mozilla.org/?tree=Try&rev=27898d8ca156. Propose to checkin for -16.
Comment 5 Jason Duell [:jduell] (needinfo me) 2012-05-28 13:15:54 PDT
Comment on attachment 627672 [details] [diff] [review]
Proposed patch, incl test case

https://hg.mozilla.org/integration/mozilla-inbound/rev/75a9a7debdb0
Comment 6 Ed Morley [:emorley] 2012-05-29 10:21:02 PDT
Please can you set assignee and milestone when landing - thanks :-)

https://hg.mozilla.org/mozilla-central/rev/75a9a7debdb0

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