From 83e7f73b730c2fc342902b6d0d3dce5d7db19a9d Mon Sep 17 00:00:00 2001 From: K Panuragh Date: Sun, 15 Nov 2026 00:30:30 +0530 Subject: [PATCH 1/2] daemon: Treat Debian's Firefox ESR as a privileged client Debian's Firefox is Firefox ESR, installed as firefox-esr.desktop. The web extension's helper registers with the portal under the name of the desktop file the browser was launched from, so requests from it arrive with the app ID firefox-esr. That isn't in the list of privileged clients, so its requests were handled as unprivileged and couldn't carry a top origin for cross-origin iframes. --- CHANGELOG.md | 1 + credentialsd/src/gateway/mod.rs | 30 ++++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b85256b..b36cf863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - ui: Display restart reason in case of premature failure - daemon: Stop retrying a transport after 5 consecutive failures before user interaction; other transports keep running. +- daemon: Treat Debian's Firefox ESR (app ID `firefox-esr`) as a privileged client, like the other Firefox builds, so it can make requests for cross-origin iframes - daemon: Build the list of devices offered to the user from libwebauthn's `available_transports()`, the same source discovery uses (#32) - ui: Pass the caller's activation token to the compositor when showing the dialog, so it can take focus when the requesting window is in the background (#152) - ui: Disable core dumps for the UI process, which handles typed PINs. Build with `-Denable_core_dumps=true` to allow them for debugging (#209) diff --git a/credentialsd/src/gateway/mod.rs b/credentialsd/src/gateway/mod.rs index 644591ec..e88c5ffd 100644 --- a/credentialsd/src/gateway/mod.rs +++ b/credentialsd/src/gateway/mod.rs @@ -348,6 +348,8 @@ fn check_origin_from_app( "org.mozilla.firefox", "firefox", "firefox-developer-edition", + // Debian's Firefox ESR, launched from firefox-esr.desktop + "firefox-esr", "xyz.iinuwa.credentialsd.DemoCredentialsUi", ]; let mut privileged = trusted_clients.contains(&app_id.as_ref()); @@ -537,9 +539,11 @@ impl Display for WebAuthnError { #[cfg(test)] mod test { - use crate::webauthn::{NavigationContext, Origin}; + use crate::webauthn::{AppId, NavigationContext, Origin}; - use super::{WebAuthnError, check_origin_from_privileged_client}; + use super::{ + RequestKind, WebAuthnError, check_origin_from_app, check_origin_from_privileged_client, + }; fn check_same_origin(origin: &str) -> Result { let origin = origin.parse().unwrap(); @@ -561,4 +565,26 @@ mod test { Err(WebAuthnError::SecurityError) )) } + + fn request_kind_for_app(app_id: &str) -> RequestKind { + let app_id: AppId = app_id.parse().unwrap(); + let origin = "https://example.com".parse().unwrap(); + check_origin_from_app(&app_id, origin, None).unwrap() + } + + #[test] + fn test_firefox_esr_is_privileged() { + assert!(matches!( + request_kind_for_app("firefox-esr"), + RequestKind::Privileged { .. } + )) + } + + #[test] + fn test_unknown_app_is_unprivileged() { + assert!(matches!( + request_kind_for_app("com.example.App"), + RequestKind::Unprivileged(_) + )) + } } From dfe739813a4a41885745a438b28c171f40b2bb1c Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Mon, 16 Nov 2026 12:45:33 -0600 Subject: [PATCH 2/2] doc: Tweak CHANGELOG message --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b36cf863..406bd146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - ui: Display restart reason in case of premature failure - daemon: Stop retrying a transport after 5 consecutive failures before user interaction; other transports keep running. -- daemon: Treat Debian's Firefox ESR (app ID `firefox-esr`) as a privileged client, like the other Firefox builds, so it can make requests for cross-origin iframes +- daemon: Treat Debian's Firefox ESR (app ID `firefox-esr`) as a privileged client, like the other Firefox builds - daemon: Build the list of devices offered to the user from libwebauthn's `available_transports()`, the same source discovery uses (#32) - ui: Pass the caller's activation token to the compositor when showing the dialog, so it can take focus when the requesting window is in the background (#152) - ui: Disable core dumps for the UI process, which handles typed PINs. Build with `-Denable_core_dumps=true` to allow them for debugging (#209)