[webext] Can't add search provider with http only (without https) even for localhost URL
Categories
(WebExtensions :: General, defect, P5)
Tracking
(firefox72 wontfix, firefox73 wontfix, firefox74 wontfix, firefox79 fixed)
People
(Reporter: actionless.loveless, Assigned: myeongjun.ko, Mentored)
References
Details
(Keywords: good-first-bug, testcase)
Attachments
(5 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
- Create webextesion with only
chrome_settings_overrides:
"chrome_settings_overrides": {
"search_provider": {
"name": "Search Jackett",
"search_url": "http://127.0.0.1:9117/UI/Dashboard#search={searchTerms}&tracker=&category=",
"keyword": "j",
"favicon_url": "http://127.0.0.1:9117/favicon.ico?"
}
}
- Try to load it into Firefox
Actual results:
Can't install the extension:
Extension is invalid
Reading manifest: Error processing chrome_settings_overrides.search_provider.search_url: String "http://127.0.0.1:9117/UI/Dashboard#search={searchTerms}&tracker=&category=" must match /^https:\/\/.*$/
Expected results:
It should be installed successfully, it's more than reasonless to require https for localhost communications (and generally demanding it against the user will).
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Comment 1•1 year ago
|
||
| Reporter | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Hello,
I have managed to reproduce the issue using the provided STR and attached extension on the latest Nightly (74.0a1/20200131013147), Beta (73.0b11/20200128001646) and Release (72.0.2/20200117190643) under Windows 10 Pro 64-bit and macOS High Sierra 10.15.
Attempting to load the extension in about:debugging will produce the error from Comment 2 and the installation fails.
Comment 4•1 year ago
|
||
Mike, do you have any issue with opening http on localhost for search?
Comment 5•1 year ago
|
||
IMO it's fine to loosen the https restriction for localhost.
| Reporter | ||
Comment 6•1 year ago
|
||
commit 69b79b5b524c6592692a84f2c6e503ea1a3670e4
Author: actionless <actionless.loveless@gmail.com>
Date: Thu Mar 12 21:29:11 2020 +0100
1612013 extensions: schemas: allow http for localhost
diff --git a/browser/components/extensions/schemas/chrome_settings_overrides.json b/browser/components/extensions/schemas/chrome_settings_overrides.json
index 8aa9b3e5dd..e38fdfa588 100644
--- a/browser/components/extensions/schemas/chrome_settings_overrides.json
+++ b/browser/components/extensions/schemas/chrome_settings_overrides.json
@@ -33,7 +33,7 @@
"search_url": {
"type": "string",
"format": "url",
- "pattern": "^https://.*$",
+ "pattern": "^(https:\/\/|http:\/\/(localhost|127\.0\.0\.1)).*$",
"preprocess": "localize"
},
"favicon_url": {
@@ -45,7 +45,7 @@
"suggest_url": {
"type": "string",
"optional": true,
- "pattern": "^https://.*$|^$",
+ "pattern": "^(https:\/\/|http:\/\/(localhost|127\.0\.0\.1)).*$",
"preprocess": "localize"
},
"instant_url": {
@@ -102,7 +102,7 @@
"type": "string",
"optional": true,
"format": "url",
- "pattern": "^https://.*$",
+ "pattern": "^(https:\/\/|http:\/\/(localhost|127\.0\.0\.1)).*$",
"preprocess": "localize"
},
"alternate_urls": {
Comment 7•1 year ago
|
||
If this is your first contribution, please refer to https://wiki.mozilla.org/WebExtensions/Contribution_Onramp on how to get started.
Mentor: :mixedpuppy
Comment 8•1 year ago
|
||
Hey actionless.loveless! Just saw that you added a patch to the comment! \o/ Can you go ahead and make that change on Phabricator? Check the documentation in comment 7 for instructions. :)
| Reporter | ||
Comment 9•1 year ago
|
||
extensions: schemas: allow http for localhost
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Hey actionless.loveless! Just wanted to check in on this bug since it's been a few weeks and it looks like you're close to finishing this bug off. :) Are you interested in getting this over the finish line?
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Comment 11•1 year ago
|
||
hi :caitmuenste! it would be better if somebody would pick my patch off to bring it to the finish line
Comment 12•1 year ago
|
||
Thanks for the update, actionless.loveless! We'll unassign you from the bug for now; please know that you can come back and finish it off in the future if you would like.
| Assignee | ||
Comment 13•1 year ago
|
||
Updated•1 year ago
|
Comment 14•1 year ago
|
||
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/48dbf3178e91 add search provider with http for localhost URL r=mixedpuppy
Comment 15•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•