Closed
Bug 1613292
Opened 5 years ago
Closed 5 years ago
Web share impl is using a localized string for a web-visible exception
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla74
| Tracking | Status | |
|---|---|---|
| firefox74 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This is both a privacy leak and a compat risk.
Navigator::Share has this bit:
nsAutoString message;
nsContentUtils::GetLocalizedString(nsContentUtils::eDOM_PROPERTIES,
"WebShareAPI_NeedOneMember", message);
aRv.ThrowTypeError<MSG_MISSING_REQUIRED_DICTIONARY_MEMBER>(message);
return nullptr;
There are two problems here:
- We should not be throwing localized strings to content as exceptions.
- This is misusing the
MSG_MISSING_REQUIRED_DICTIONARY_MEMBERerror, which expects a single argument: a description of the member. The string here is adding all sorts of other stuff, and will break badly if theMSG_MISSING_REQUIRED_DICTIONARY_MEMBERmessage is reworded.
| Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
| Assignee | ||
Updated•5 years ago
|
Component: DOM: CSS Object Model → DOM: Core & HTML
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/497d7a741b54
Stop throwing localized errors from web share code to web content. r=farre
Comment 3•5 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox74:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Updated•5 years ago
|
Has Regression Range: --- → yes
Keywords: regression
You need to log in
before you can comment on or make changes to this bug.
Description
•