Closed
Bug 797677
Opened 12 years ago
Closed 12 years ago
getPluginInfo indexes into navigator.mimeTypes unsafely
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 18
Tracking | Status | |
---|---|---|
firefox17 | --- | affected |
People
(Reporter: jruderman, Assigned: jruderman)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files, 1 obsolete file)
Loading the testcase triggers:
JavaScript error: chrome://browser/content/browser.js, line 3019: NS_ERROR_FAILURE: Failure
This corresponds to line 40 of browser-plugins.js:
40 let navMimeType = navigator.mimeTypes[tagMimetype];
This line does the wrong thing if tagMimeType is a number, or any property that exists on navigator.mimeTypes ("__proto__", "watch", "length", etc).
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #667797 -
Attachment is obsolete: true
Updated•12 years ago
|
Comment on attachment 667798 [details] [diff] [review]
suggested fix
Review of attachment 667798 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me. I think Jared will have to give the actual r+.
Attachment #667798 -
Flags: review?(jaws)
Attachment #667798 -
Flags: review?(dkeeler)
Attachment #667798 -
Flags: feedback+
Comment 4•12 years ago
|
||
Comment on attachment 667798 [details] [diff] [review]
suggested fix
Review of attachment 667798 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good. As discussed in person, please push it to try server.
Attachment #667798 -
Flags: review?(jaws) → review+
Updated•12 years ago
|
Assignee: nobody → jruderman
Status: NEW → ASSIGNED
Comment 5•12 years ago
|
||
David, can you write a browser-chrome test for this to make sure that an invalid mimetype doesn't generate a chrome error? I believe devtools has a test that checks for error counts in a webpage.
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Flags: in-testsuite?
Assignee | ||
Comment 7•12 years ago
|
||
Filed bug 798237 so we don't forget to add a test.
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
You need to log in
before you can comment on or make changes to this bug.
Description
•