Skip to content

v0.3.10#74

Merged
jotuel merged 20 commits intomainfrom
v0.3.10
Feb 19, 2026
Merged

v0.3.10#74
jotuel merged 20 commits intomainfrom
v0.3.10

Conversation

@jotuel
Copy link
Member

@jotuel jotuel commented Feb 19, 2026

  • Fallback to finding user with libc instead of enviroment variable
  • Swedish translation thanks to @bittin
  • Finnish translation

google-labs-jules bot and others added 20 commits February 18, 2026 11:50
Replaced hardcoded "Failed to connect to DBus: {}" string with a localized message.
Added ConnectDbus variant to AppError and updated localized_message to use fl!("error-connect-dbus", err = msg).
Added unit test to verify localization.
Updated Cargo.lock to match Cargo.toml version.
…33563

Localized hardcoded DBus connection error
Avoid creating a new DeviceProxy for every `list_enrolled_fingers` call.
Instead, create it once when the device is found and store it in `AppModel`.
This reduces allocation overhead and potential DBus introspection traffic.

Changes:
- `AppModel` now stores `Option<DeviceProxy<'static>>`.
- `find_device` returns both the object path and the proxy.
- `list_enrolled_fingers_dbus` accepts a reference to an existing proxy.
- `Message::DeviceFound` carries the proxy along with the path.
…6709234226409125

perf: Cache and reuse DBus DeviceProxy
This change addresses a security vulnerability where the `USER` environment variable was used to determine the current user identity. This variable can be spoofed by an attacker, potentially leading to privilege escalation or unauthorized actions.

We now use `nix::unistd::User::from_uid(Uid::current())` to securely determine the current user based on the effective user ID. This ensures that the application operates on the correct user account.

The `nix` dependency was added to `Cargo.toml` to support this functionality.

The logic in `src/app/mod.rs` was updated in two places:
1. Initializing `selected_user`.
2. Fallback logic when `AccountsService` returns no users.

Verification:
- `cargo check` passes.
- `cargo test` passes.
- Dependencies installed: `libxkbcommon-dev`, `libdbus-1-dev`, `libglib2.0-dev`, `libwayland-dev`.
…04572518204373

Replace insecure USER env var with nix::unistd::User::from_uid
…6703630380

Add unit tests for UserOption::fmt implementation
Add Swedish Localization
@jotuel jotuel merged commit 2f6debd into main Feb 19, 2026
1 check passed
@jotuel jotuel deleted the v0.3.10 branch February 19, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants