Closed Bug 1354342 Opened 7 years ago Closed 7 years ago

Allow local pages in chrome_settings_overrides homepage

Categories

(WebExtensions :: Untriaged, enhancement)

enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: andy+bugzilla, Assigned: andy+bugzilla, Mentored)

References

Details

(Keywords: good-first-bug)

Attachments

(1 file)

Currently chrome_settings_overrides homepage takes a fully formed URL, such as https://example.net. It would be nice if we could serve local pages as well, but something like: home.html raises an error.

1491520613461	addons.webextension.<unknown>	ERROR	Loading extension 'null': Reading manifest: Error processing chrome_settings_overrides.homepage: TypeError: home.html is not a valid URL.

I can manually set the home page to something like:

moz-extension://7684a772-710f-1c4d-b30f-9004fb63c26d/home.html

And that works just fine. But I don't know the value of the UUID in the manifest.

If the value of homepage is local could we prepend the moz-extension://.../ to the value of the homepage?
Mentor: mwein
Keywords: good-first-bug
Assignee: nobody → amckay
Comment on attachment 8855575 [details]
bug 1354342 allow a relativeUrl for homepage

https://reviewboard.mozilla.org/r/127416/#review130104
Attachment #8855575 - Flags: review?(mixedpuppy) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0a3044dc01d2
allow a relativeUrl for homepage r=mixedpuppy
Keywords: checkin-needed
Backed out in https://hg.mozilla.org/integration/autoland/rev/1872baf8c37e because eslint thought you maybe actually meant to do soemthing with that defaultHomePage var after you assigned it a value, https://treeherder.mozilla.org/logviewer.html#?job_id=89408952&repo=autoland
Flags: needinfo?(amckay)
Comment on attachment 8855575 [details]
bug 1354342 allow a relativeUrl for homepage

https://reviewboard.mozilla.org/r/127416/#review130438

huh, wonder why reviewboard/eslint let that through.
Sorry about that Phil. Also learnt my eslint local installation was busted, now its fixed.
Flags: needinfo?(amckay)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6c4fc0881a77
allow a relativeUrl for homepage r=mixedpuppy
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6c4fc0881a77
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
What exactly do these formats mean? I would think that changing the format from "url" to "relativeUrl" is making this more restrictive not less restrictive.

Is this right?

url -> absolute URL
relativeUrl -> absolute URL or relative URL
strictRelativeUrl -> not protocol relative, but absolute URL or relative URL

Which seems like it would mean relativeUrl is any URL, and strictRelativeUrl is any non protocol relative URL.
Flags: needinfo?(mixedpuppy)
url -> MUST be absolute URL
relativeUrl -> CHOICE of absolute URL or relative URL (including protocol relative)
strictRelativeUrl -> MUST be non-protocol relative

relativeUrl is the least restrictive of the three in what value is accepted.  

IMHO url should have been absoluteUrl, and relativeUrl should have been just url.
Flags: needinfo?(mixedpuppy)
Actually after some more testing strictRelativeUrl needs to be relative, but not protocol relative.

So essentially it cannot have a host, from that I can tell. Or it's path only, however you want to look at it.
See Also: → 1373297
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: