Conversation
Member
jotuel
commented
Feb 19, 2026
- Fallback to finding user with libc instead of enviroment variable
- Swedish translation thanks to @bittin
- Finnish translation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.