Closed Bug 1535803 Opened 6 years ago Closed 6 years ago

Cannot inject content script on page refresh with activeTab permission

Categories

(WebExtensions :: Untriaged, defect)

65 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: sharmalay, Unassigned)

Details

Attachments

(1 file)

820 bytes, application/x-bzip
Details
Attached file test-refresh.tar.bz2

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

  1. Temporarily load the attached minimal extension source.
  2. Navigate to a page and activate extension through browser action.
  3. Refresh the page.

Actual results:

An error is logged to the background page console:

Error: Missing host permission for the tab

This error originates from the function

handleExtensionExecute()

in the file

toolkit/components/extensions/ExtensionContent.jsm

in the Firefox source.

Expected results:

The background page should be able to inject scripts into the tab based off of having the activeTab permission and previous activation of the extension by the user.

This test case works in the Chrome browser. Granting permission for extensions to call executeScript on page refresh reduces the need for extensions to ask for overly permissive host permissions to achieve this functionality.

Product: Firefox → WebExtensions

The activeTab permission is lost on any navigation, including refresh. This is the expected behavior.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: