Limit OpenSearchEngine to allow only the protocols where users can load engines from
Categories
(Firefox :: Search, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(1 file)
OpenSearchEngine currently allows loading from https, http, ftp, data, file, resource and chrome protocols.
However, LinkHandlerChild - the only place a user can currently install an OpenSearch engine - only allows https, http and ftp: https://searchfox.org/mozilla-central/rev/927e525f481a93a8f63d27a78ae6201e42b1b1fb/browser/actors/LinkHandlerChild.jsm#149
Reducing the list in OpenSearchEngine allows us to simplify the load path handling. Whilst here, we can also simplify the constructor and load functions. This should make understanding what is happening there much easier.
The side effect of this is that we must also change a lot of tests, since we can't load from chrome/file protocols, however I think that is a benefit as it makes the tests more realistic, and makes it more obvious what needs to be changed in the future if we want to move away from using OpenSearch engines in the majority of tests.
Assignee | ||
Comment 1•3 years ago
|
||
The urls where an OpenSearch engine can be loaded from are already limited in LinkHandlerChild. This is cleaning up and simplifying what the OpenSearchEngine allows, and as a result allows the load path handling to be greatly simplified.
The test changes are due to no longer allowing chrome or file protocols. For future, we probably want to move away from OpenSearch for most of these, but the changes will make it easier to find the places to update.
Assignee | ||
Updated•3 years ago
|
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63167d041bb4 Simplify OpenSearchEngine to only allow loading engines from protocols where users can load them from. r=mak
Comment 3•3 years ago
|
||
bugherder |
Description
•