activeTab of permissions is not valid for tabs.executeScript in sidebar_action
Categories
(WebExtensions :: Frontend, defect, P3)
Tracking
(firefox57 wontfix)
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | wontfix |
People
(Reporter: sin, Unassigned)
Details
(Keywords: testcase, Whiteboard: [sidebar][triaged])
Attachments
(2 files)
Updated•8 years ago
|
Updated•8 years ago
|
Updated•7 years ago
|
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Comment 2•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Updated•3 years ago
|
Comment 5•1 year ago
|
||
Comment 0 states that the expected behavior is, "If 'activeTab' is set in 'permissions', when tabs.executeScript() is executed in sidebar_action at first, Success." I understand why an extension developers would want (I do too), but at the moment I don't think browsers should grant the activeTab permission in this case.
The original issue report appears to be conflating interactions with DOM content of extensions pages and how activeTab is granted. The activetTab permission is not granted when the user clicks the "Execute Script" button in step 3. Rather, activeTab is granted when the user clicks the toolbar button in step 3. When the user later clicks the "Execute Script" button a moment later in that step, it has already been given the permissions necessary for the tabs.executeScript() call to succeed. This may seem like an inconsequential difference, but it's key to understanding why the button in the popup currently works but the button in the sidebar does not; in the latter case the browser does not have a clear signal that the user intended to give the extension access to the page.
IMO user interactions with a sidebar content are not a strong signal that the user wants to run the extension on the current page. The user may be interacting with a sidebar page for a variety of reasons that have nothing to do with exposing sensitive information about the page to the extension or running the extension on the current page. For example, imagine an extension that shows the user's to do list in the sidebar. The user may be might interact with the sidebar to add items to a grocery list or to mark an existing item as complete.
I would be more comfortable with granting activeTab if the sidebar interactions that could grant it were heavily limited. For example, say we only granted the permission for trusted click events (a concept not supported in web APIs) on button elements in the sidebar. I still worry that the incidence of spurious grants would be too high, but I'd defer to a security expert here.
Description
•