Closed Bug 1217944 Opened 9 years ago Closed 8 years ago

Wildcards don't work in web_accessible_resources

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox48 verified, firefox51 verified)

VERIFIED FIXED
mozilla48
Iteration:
48.3 - Apr 25
Tracking Status
firefox48 --- verified
firefox51 --- verified

People

(Reporter: wbamberg, Assigned: aswan)

Details

(Whiteboard: [berlin][good first bug])

Attachments

(3 files)

Attached file froggify.xpi
I've attached a WebExtension that adds a button to the toolbar: click the button, it injects a content script that replaces images in the page with a picture of a frog.

The frog pic needs to be web accessible. I'm using a wildcard for its manifest.json entry:

  "web_accessible_resources": [
    "beasts/*.jpg"
  ]

Pressing the button yields: no frogs, and a security error in the console. If you change the manifest.json entry to list the file:

  "web_accessible_resources": [
    "beasts/frog.jpg"
  ]

...then it works as expected.
In Chrome I can expose web accessible resources that take query string parameters.

For example this content script:

    var iframe = document.createElement("iframe");
    iframe.src = chrome.extension.getURL("ui.html") + "?param=xyz";
    document.body.appendChild(iframe);

Will this be possible in Firefox soon?
(In reply to Jesper Kristensen from comment #2)
> Will this be possible in Firefox soon?

See bug 1247081.
Whiteboard: [berlin]
Whiteboard: [berlin] → [berlin][good first bug]
Flags: blocking-webextensions?
Flags: blocking-webextensions? → blocking-webextensions+
Assignee: nobody → aswan
Comment on attachment 8738717 [details]
MozReview Request: Bug 1217944 Part 1 Make MatchGlobs work on arbitrary strings r?kmag

https://reviewboard.mozilla.org/r/44667/#review41417
Attachment #8738717 - Flags: review?(kmaglione+bmo) → review+
Attachment #8738718 - Flags: review?(kmaglione+bmo) → review+
Comment on attachment 8738718 [details]
MozReview Request: Bug 1217944 Part 2 Support wildcards in web_accessible_resources r?kmag

https://reviewboard.mozilla.org/r/44669/#review41419
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4cdbb38c78e6
https://hg.mozilla.org/mozilla-central/rev/f35e7953e89f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Iteration: --- → 48.3 - Apr 25
I could reproduce this issue on Firefox 44.0a1 (20151023030245).
This issue is verified as fixed on Firefox unbranded build 48.0a1 (20160408030212) and Firefox 51.0a1 (2016-09-12), I can confirm that the images in the page are replaced with a picture of a frog.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: