Closed
Bug 2077408
Opened 1 month ago
Closed 8 days ago
browser.publicSuffix.getDomain API does not handle some allowPlainSuffix+allowUnknownSuffix edge cases correctly
Categories
(WebExtensions :: General, defect, P2)
WebExtensions
General
Tracking
(firefox162 fixed)
RESOLVED
FIXED
162 Branch
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: kzar, Assigned: kzar)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 external file)
While working on the Web Platform Tests (WPT) for the browser.publicSuffix WebExtensions APIs, I noticed a couple of edge-cases with browser.publicSuffix.getDomain that aren't being handled correctly.
According to the API proposal:
allowPlainSuffixtargets a hostname that "is itself a known eTLD".allowUnknownSuffixtargets a hostname that "lacks a known eTLD".allowUnknownSuffixreturns "last 2 labels, or input hostname if single label".
So for example, we should take care to handle some edge-cases as follows:
browser.publicSuffix.getDomain("unknown", {
allowUnknownSuffix: false,
allowPlainSuffix: true
}); // => null
browser.publicSuffix.getDomain("unknown", {
allowUnknownSuffix: true,
allowPlainSuffix: false
}); // => "unknown"
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
The "allowPlainSuffix" option should only apply to known eTLDs, so if an unknown
eTLD is passed to getDomain, the "allowUnknownSuffix" option should determine
what is returned.
Updated•1 month ago
|
Severity: -- → S4
Priority: -- → P2
Pushed by kzar@kzar.co.uk:
https://github.com/mozilla-firefox/firefox/commit/60a29a558e37
https://hg.mozilla.org/integration/autoland/rev/ff2125c49ec8
Fix handling of publicSuffix.getDomain options r=robwu
Comment 3•8 days ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 days ago
status-firefox162:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•