Closed
Bug 1783442
Opened 2 years ago
Closed 2 years ago
WebExtensionPolicy case missmatch with hostname is possible
Categories
(WebExtensions :: General, defect, P3)
WebExtensions
General
Tracking
(firefox105 fixed)
RESOLVED
FIXED
105 Branch
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: mixedpuppy, Assigned: mixedpuppy)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
WebExtensionPolicy accepts any char case for mozHostname, which in practice doesn't matter since we pass in lowercased uuid's for this. However, a test that passes an upper case uuid can have unexpected failures. The following will fail. This was discovered while working on a followup fix in D153865.
const uuid3 = "56652231-D7E2-45D1-BDBD-BD3BFF80927E";
let policy3 = new WebExtensionPolicy({
id: "some@id",
mozExtensionHostname: uuid3,
baseURL,
localizeCallback() {},
allowedOrigins: new MatchPatternSet([]),
permissions: ["<all_urls>"],
});
policy3.active = true;
equal(
WebExtensionPolicy.getByHostname(uuid3),
policy3,
"Hostname lookup should match policy"
);
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → mixedpuppy
Status: NEW → ASSIGNED
Assignee | ||
Updated•2 years ago
|
Whiteboard: [addons-jira]
Updated•2 years ago
|
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e4ba71601a2 Fix cases where case sensitivy matters in WebExtensionPolicy r=zombie
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox105:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•