Open Bug 2049411 Opened 5 months ago Updated 1 month ago

Establish parity with Firefox: Allow extensions to query for tabs with urls of own pages wihout the tabs permission.

Categories

(Thunderbird :: Add-Ons: Extensions API, task)

task
Points:
3

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: john, Assigned: john)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

No description provided.
Summary: Establish parity with Firefox: Allow extensions to query for tabs with urls of own pages wihout the tabs prmission. → Establish parity with Firefox: Allow extensions to query for tabs with urls of own pages wihout the tabs permission.

tabs.query() rejected the whole call up front whenever the extension lacked
the tabs permission and a url or title filter was present. That is stricter
than Firefox, which has no such check and instead lets the shared per-tab
matcher decide visibility: TabBase.matches() 1 filters out a tab when url or
title is requested and !hasTabPermission, and hasTabPermission already grants
access to the extension's own moz-extension:// pages (and host-permission
matched tabs) via allowedOrigins.

Thunderbird inherits that same matcher, so the up-front throw only shadowed
the correct per-tab logic and blocked the common pattern of an extension
searching for a tab showing one of its own pages without the tabs permission.

This patch removes the up-front check to match Firefox. Own-page and host-
permission matched tabs are now returned without the tabs permission; other url
or title queries silently return no matches. Malformed url or title input still
throws the existing input-validation errors.

Assignee: nobody → john
Status: NEW → ASSIGNED
Points: --- → 3
No longer blocks: tb-maintenance-2026-q2
Restrict Comments: true
Restrict Comments: false
No longer blocks: tb-maintenance-2026-q3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: