Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- 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)
- ui: Tell the user when they enter a PIN that was already tried for the current PIN prompt, instead of sending it again. Tried PINs are kept as fixed-size SHA-256 hashes in locked memory excluded from core dumps, and wiped as soon as the prompt ends (#209)

# 0.4.0 [2026-11-05]

Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions credentialsd-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ credentialsd-common = { path = "../credentialsd-common" }

futures-lite.workspace = true
libc.workspace = true
rand = "=0.10.2"
serde.workspace = true
sha2 = "=0.10.9"
tracing.workspace = true
tracing-subscriber.workspace = true
zbus = { workspace = true, default-features = false, features = ["async-io"]}
Expand All @@ -25,3 +27,4 @@ gio-unix = "=0.22.8"
gtk = { version = "=0.11.4", package = "gtk4", features = ["v4_14"] }
gdk-wayland = { version = "=0.11.4", package = "gdk4-wayland", optional = true }
qrcode = "=0.14.1"
zeroize = "=1.9.0"
2 changes: 1 addition & 1 deletion credentialsd-ui/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use credentialsd_common::{
model::{BackgroundEvent, PinNotSetError, UserInteractedEvent},
};

const CTAP_CLIENT_SECRET_MAX_LEN: usize = 63;
pub(crate) const CTAP_CLIENT_SECRET_MAX_LEN: usize = 63;

#[derive(Debug)]
pub struct FlowControlClient {
Expand Down
4 changes: 4 additions & 0 deletions credentialsd-ui/src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ pub enum ViewUpdate {
NeedsPin {
attempts_left: Option<u32>,
},
/// The entered PIN was already tried on this device and was not sent.
PinAlreadyTried {
attempts_left: Option<u32>,
},
PinNotSet {
error: PinNotSetError,
},
Expand Down
16 changes: 16 additions & 0 deletions credentialsd-ui/src/gui/view_model/gtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,22 @@ impl ViewModel {
view_model.set_prompt(prompt);
view_model.set_usb_nfc_pin_entry_visible(true);
}
ViewUpdate::PinAlreadyTried { attempts_left } => {
let prompt = if let Some(left) = attempts_left {
let localized = ngettext(
"You already tried this PIN. Enter a different PIN. One attempt remaining.",
"You already tried this PIN. Enter a different PIN. %d attempts remaining.",
left,
);
localized.replace("%d", &format!("{}", left))
} else {
gettext(
"You already tried this PIN. Enter a different PIN.",
)
};
view_model.set_prompt(prompt);
view_model.set_usb_nfc_pin_entry_visible(true);
}
ViewUpdate::NeedsUserVerification { attempts_left } => {
let prompt = match attempts_left {
Some(left) => {
Expand Down
Loading