MV3 - specifying resource in "web_accessible_resources" prevents it's usage inside addon pages
Categories
(WebExtensions :: Untriaged, defect, P2)
Tracking
(firefox-esr91 wontfix, firefox-esr102 disabled, firefox101 disabled, firefox102 disabled, firefox103 disabled, firefox104 disabled, firefox105 verified)
People
(Reporter: juraj.masiar, Assigned: mixedpuppy)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [addons-jira])
Attachments
(5 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
- using Nightly with allowed MV3 extensions
- extract and load attached extension.
If you haveweb-ext
installed, you can use this command:
web-ext run --firefox=firefoxdeveloperedition --pref=extensions.manifestV3.enabled=true
- open popup
Actual results:
Only one image is visible.
Expected results:
There should be two images.
Somehow, by specifying image "128.png" in the web_accessible_resources
list will break it's usage in the addon:
"web_accessible_resources": [
{
"resources": [
"128.png"
],
"matches": [ "*://*/*" ]
}
],
Comment 1•2 years ago
|
||
Hello,
I reproduced the issue on the latest Nightly (103.0a1/20220608214824), Beta (102.0b5/20220607212916) and Release (101.0/20220526203855) under Windows 10 x64 and Ubuntu 16.04 LTS.
After loading the extension and opening the add-on pop-up, only one image is visible, as described in Comment 0.
For more details, see the attached screenshot.
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
We should probably skip the web-accessible check if the requesting principal represents the same extension at the matched WebExtensionPolicy.
E.g. checking if aURI
is a moz-extension:
-URL and its host name is the same as mHostname
in https://searchfox.org/mozilla-central/rev/28ed523a3ed5dbf5f6b008cf1e28a9e8a8597b5e/toolkit/components/extensions/WebExtensionPolicy.h#119-129
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Set release status flags based on info from the regressing bug 1697334
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Set release status flags based on info from the regressing bug 1697334
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•2 years ago
|
||
I am not sure, but I think this https://hg.mozilla.org/integration/autoland/rev/1aa5ec22f47a1aeccb4b0a1ff678d03b3cf26185#l1.12 might be wrong. To me this reads like any URL can access the resource. I think we first need to verify if aURI
is an extension by looking up the policy.
Comment 10•2 years ago
|
||
bugherder |
Comment 11•2 years ago
|
||
Verified the fix on the latest Nightly (105.0a1/20220802214455) under Windows 10 x64 and Ubuntu 16.04 LTS.
After loading the extension and opening the add-on pop-up, both images are visible, confirming the fix.
For a second confirmation of the issue being fixed on Nightly 105, the same STR have been performed on the latest Beta (104.0b5/20220802185803), the issue still occurring there.
For more details, see the attached screenshot.
Comment 12•2 years ago
|
||
Assignee | ||
Comment 13•2 years ago
|
||
Reopening for a followup patch
Assignee | ||
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
Comment 16•2 years ago
|
||
bugherder |
Comment 17•2 years ago
|
||
Re-verified the fix on the latest Nightly (105.0a1/20220809213127) using the original STR and example extension.
Opening the add-on pop-up still reveals both images as visible, as in the previous verification. No negative impact due to the follow up patch.
Description
•