Firefox · Core
CVE-2025-10534
Logic Error in Core
Overview
Low
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
forbrowser/modules/webrtcUI.sys.mjs |
modified | |
ifbrowser/modules/webrtcUI.sys.mjs |
modified |
Files Changed
browser/locales/en-US/browser/webrtcIndicator.ftlbrowser/modules/webrtcUI.sys.mjs
Patch
diff --git a/browser/locales/en-US/browser/webrtcIndicator.ftl b/browser/locales/en-US/browser/webrtcIndicator.ftl
index a1bdae31c00..b702214ec78 100644
--- a/browser/locales/en-US/browser/webrtcIndicator.ftl
+++ b/browser/locales/en-US/browser/webrtcIndicator.ftl
@@ -60,7 +60,7 @@ webrtc-screen-system-menu =
## These strings are only used on Mac for menus attached to icons
## near the clock on the mac menubar.
## Variables:
-## $streamTitle (String): the title of the tab using the share.
+## $streamTitle (String): the host of the tab using the share.
## $tabCount (Number): the title of the tab using the share.
webrtc-indicator-menuitem-control-sharing =
diff --git a/browser/modules/webrtcUI.sys.mjs b/browser/modules/webrtcUI.sys.mjs
index 03023cc8026..f4380055d39 100644
--- a/browser/modules/webrtcUI.sys.mjs
+++ b/browser/modules/webrtcUI.sys.mjs
@@ -990,8 +990,10 @@ export function showStreamSharingMenu(win, event, inclWindow = false) {
let stream = activeStreams[0];
const sharingItem = doc.createXULElement("menuitem");
- const streamTitle = stream.browser.contentTitle || stream.uri;
- doc.l10n.setAttributes(sharingItem, l10nIds[0], { streamTitle });
+ const displayHost = getDisplayHostForStream(stream);
+ doc.l10n.setAttributes(sharingItem, l10nIds[0], {
+ streamTitle: displayHost,
+ });
sharingItem.setAttribute("disabled", "true");
menu.appendChild(sharingItem);
@@ -1015,11 +1017,11 @@ export function showStreamSharingMenu(win, event, inclWindow = false) {
for (let stream of activeStreams) {
const controlItem = doc.createXULElement("menuitem");
- const streamTitle = stream.browser.contentTitle || stream.uri;
+ const displayHost = getDisplayHostForStream(stream);
doc.l10n.setAttributes(
controlItem,
"webrtc-indicator-menuitem-control-sharing-on",
- { streamTitle }
+ { streamTitle: displayHost }
);
controlItem.stream = stream;
controlItem.addEventListener("command", this);
@@ -1028,6 +1030,25 @@ export function showStreamSharingMenu(win, event, inclWindow = false) {
}
}
+function getDisplayHostForStream(stream) {
+ let uri = Services.io.newURI(stream.uri);
+
+ let displayHost;
+
+ try {
+ displayHost = uri.displayHost;
+ } catch (ex) {
+ displayHost = null;
+ }
+
+ // Host getter threw or returned "". Fall back to spec.
+ if (displayHost == null || displayHost == "") {
+ displayHost = uri.displaySpec;
+ }
+
+ return displayHost;
+}
+
function onTabSharingMenuPopupShowing(e) {
const streams = webrtcUI.getActiveStreams(true, true, true, true);
for (let streamInfo of streams) {
Loading diff…
References
On This Page