Repository navigation
fix: honor tabs permission for url and title in tabs.query results - #52597
Conversation
jkleinsc
left a comment
There was a problem hiding this comment.
LGTM; just needs rebase on main to resolve LSAN errors.
ee5273d to
4923c7d
Compare
|
rebased to origin/main to pick up the fixes to the unrelated CI failures |
|
Heads up: Windows CI builds moved to new runners on Monday and the old ones have now been removed. This branch predates that, so its Windows build jobs still point at the old runners and will sit queued forever if CI runs again. Rebasing on |
tabs.get and tabs.update only expose the privileged url and title properties when the extension has the tabs permission or host access, matching Chrome and our own tabs schema docs, but tabs.query populated them unconditionally. Share one CanAccessPrivilegedTabFields check across query, get and update, and evaluate it against the last committed URL.
4923c7d to
968107e
Compare
|
Release Notes Persisted
|
|
I have automatically backported this PR to "45-x-y", please check out #53353 |
|
I have automatically backported this PR to "44-x-y", please check out #53354 |
|
I have automatically backported this PR to "42-x-y", please check out #53355 |
|
I have automatically backported this PR to "43-x-y", please check out #53356 |
A merge race between #52744, which removed the uuid dev-dependency and converted specs to randomUUID() from node:crypto, and #52597, which added a tabs.query test using uuid.v4(), left one stray uuid reference that breaks spec runner compilation (TS2304) on every test shard. Swap it for randomUUID(), matching #52744's conversion. Co-authored-by: Claude <[email protected]>
Description of Change
chrome.tabs.query()returnedurl/titleeven when the extension had neither thetabspermission nor host access to the tab;tabs.get/tabs.updatealready gated these, matching Chrome and our own tabs schema docs. Now all three go through oneCanAccessPrivilegedTabFieldscheck.no-privilegesMV3 fixture and adds a spec for thequerycase.Checklist
npm testpassesRelease Notes
Notes: Fixed
chrome.tabs.query()returning taburlandtitleto extensions without thetabspermission or host access, aligning withtabs.get.