Closed Bug 774240 Opened 10 years ago Closed 10 years ago

data URI parsing mis-detects "base64" parameter as extension

Categories

(Core :: Networking, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: julian.reschke, Assigned: felix_moeller)

References

Details

Attachments

(1 file, 1 obsolete file)

"data" URIs (RFC 2397) allow extension parameters; they could be called "base64" but must not be confused with the "base64" extension.

For instance;

  data:text/plain;base64,...

*is* the base64 extension, while

  data:text/plain;base64=xy,...

is not (as indicated by the "=" sign).

See test case:

  <http://greenbytes.de/tech/tc/datauri/#base64param>

This works properly in Chrome and Opera.
Attachment #642551 - Flags: review?(rjesup)
Comment on attachment 642551 [details] [diff] [review]
Proposed patch, including test case

Change the two constant strings to single a #define BASE64_URI_TAG ";base64" (or some such name), and r+
Attachment #642551 - Flags: review?(rjesup) → review+
Attached patch proposed patchSplinter Review
thanks for the review Randell!
Attachment #642551 - Attachment is obsolete: true
Attachment #642585 - Flags: review?(rjesup)
Attachment #642585 - Flags: review?(rjesup) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/eac3221e3e86

Thanks for the patch, Felix! One request - for future patches, please follow the directions below. It makes life easier for those committing on your behalf. Thanks again!
https://developer.mozilla.org/en/Creating_a_patch_that_can_be_checked_in
Assignee: nobody → felix_moeller
Flags: in-testsuite+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/eac3221e3e86
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 781693
You need to log in before you can comment on or make changes to this bug.