Closed
Bug 890085
Opened 11 years ago
Closed 11 years ago
Malformed browser.search.defaultenginename string can lock user's searchbox selection
Categories
(Firefox :: Search, defect)
Tracking
()
RESOLVED
FIXED
Firefox 25
People
(Reporter: WeirdAl, Assigned: Gavin)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
mikedeboer
:
review+
bajaj
:
approval-mozilla-aurora+
bajaj
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
In testing FF23 beta against Ask toolbars (our company's product), our QA team discovered the searchbox would not allow the user to switch away from Ask to another search engine. Our product was setting the browser.search.defaultenginename preference to the string "Ask Search".
We are fixing this bad preference usage on our side, per instructions from https://developer.mozilla.org/en-US/docs/draft_Search_Extension_Tutorial . We should have the fix out well before FF 23 goes to the release channel.
However, there may be other products from companies who also have an invalid value for this preference. The error from nsPrefBranch.cpp was:
"NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIPrefBranch.getComplexValue]"
The offending JavaScript line was this, from nsSearchService.js:
let defaultEngine = defaultPrefB.getComplexValue("defaultenginename", nsIPLS).data;
This happens when trying to set the default engine to another selection in the searchbox.
A fix for this may be as simple as a try/catch block in the setter for default engine.
Updated•11 years ago
|
OS: Windows 7 → All
Hardware: x86_64 → All
Assignee | ||
Comment 1•11 years ago
|
||
(In reply to Alex Vincent [:WeirdAl] from comment #0)
> In testing FF23 beta against Ask toolbars (our company's product), our QA
> team discovered the searchbox would not allow the user to switch away from
> Ask to another search engine. Our product was setting the
> browser.search.defaultenginename preference to the string "Ask Search".
> We are fixing this bad preference usage on our side, per instructions from
> https://developer.mozilla.org/en-US/docs/draft_Search_Extension_Tutorial .
> We should have the fix out well before FF 23 goes to the release channel.
Thanks for the report. Can you elaborate on how you were setting it, and how you fixed it?
Assignee | ||
Updated•11 years ago
|
tracking-firefox24:
--- → ?
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #1)
> Thanks for the report. Can you elaborate on how you were setting it, and how
> you fixed it?
I've e-mailed the details privately to Gavin.
Assignee | ||
Comment 3•11 years ago
|
||
Essentially, the add-on was giving the pref an invalid default value (it's a localized pref, so its default value must be a URI to a properties file). This caused the _originalDefaultEngine getter to throw, which broke switching engines.
Attachment #772332 -
Flags: review?(mdeboer)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Target Milestone: Firefox 23 → ---
Comment 4•11 years ago
|
||
Comment on attachment 772332 [details] [diff] [review]
patch
Review of attachment 772332 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me!
Attachment #772332 -
Flags: review?(mdeboer) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Target Milestone: --- → Firefox 25
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 772332 [details] [diff] [review]
patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 738818
User impact if declined: search selection broken if a broken add-on is installed
Testing completed (on m-c, etc.): manual
Risk to taking this patch (and alternatives if risky): no risk, dead-simple protection against bogus pref values
String or IDL/UUID changes made by this patch: none
Attachment #772332 -
Flags: approval-mozilla-beta?
Attachment #772332 -
Flags: approval-mozilla-aurora?
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 8•11 years ago
|
||
Comment on attachment 772332 [details] [diff] [review]
patch
Very low risk, acts as a safety net if a broken add-on is installed for a new Fx23 feature.
Gavin please add qawanted if you think we need any additional testing wrt this new feature+toolbars
Attachment #772332 -
Flags: approval-mozilla-beta?
Attachment #772332 -
Flags: approval-mozilla-beta+
Attachment #772332 -
Flags: approval-mozilla-aurora?
Attachment #772332 -
Flags: approval-mozilla-aurora+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 9•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/bcf51c3d2810
https://hg.mozilla.org/releases/mozilla-beta/rev/0089f0c708bc
status-firefox23:
--- → fixed
status-firefox24:
--- → fixed
status-firefox25:
--- → fixed
Keywords: checkin-needed
Comment 10•11 years ago
|
||
I didn't find any installers for the Ask.com toolbar for Ubuntu or Mac. Could anyone please provide a link for download (if there is) ?
For Windows 7 64bit, I got the next results:
1) with Firefox 23 beta 3, I wasn't able to install the toolbar from http://apnstatic.ask.com/static/toolbar/everest/download/index.html?source=sp
2) with Firefox 23 beta 7 (build ID: 20130718163513), after installing the toolbar, the "browser.search.defaultenginename" preference stays the same (I tried to install Ask.com both when I didn't change the search engine from its default value (Google) and afterwards I changed it to Bing) and all 4 searches (URL bar, search bar, about:home page and contextual menu option) are performed as expected
Flags: needinfo?
Reporter | ||
Comment 11•11 years ago
|
||
(In reply to Manuela Muntean [:Manuela] [QA] from comment #10)
> I didn't find any installers for the Ask.com toolbar for Ubuntu or Mac.
> Could anyone please provide a link for download (if there is) ?
There are none. We're Windows-only at this time.
Flags: needinfo?
Comment 12•11 years ago
|
||
Thanks Alex! :)
Then I think I can mark this verified for Firefox 23, based on comment 10 (part 2))
OS: All → Other
Updated•11 years ago
|
QA Contact: manuela.muntean
Comment 13•11 years ago
|
||
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
20130812173056
Tested as verified on 24 beta 2, Win 7 64bit.
Comment 14•11 years ago
|
||
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Tested as verified on latest Aurora (20130908004001).
Keywords: verifyme
You need to log in
before you can comment on or make changes to this bug.
Description
•