fix: address audit findings — polling, symlinks, validation, wallpaper removal (v0.7.0)
Three parallel audits (quality, performance, security) identified issues across the codebase. This commit addresses all remaining findings: - Replace busy-loop polling in run_command with child.wait() + timeout thread - Canonicalize ~/.face and AccountsService avatar paths to prevent symlink abuse - Add detect_locale_with() DI function for testable locale detection - Move config I/O from activate() to main() to avoid blocking GTK main loop - Validate background_blur range (0–200), reject invalid values with warning - Remove embedded wallpaper from GResource — moonarch provides it via filesystem (binary size ~3.2MB → ~1.3MB)
This commit is contained in:
@@ -17,7 +17,7 @@ Lock, Logout, Hibernate, Reboot, Shutdown.
|
||||
## Projektstruktur
|
||||
|
||||
- `src/` — Rust-Quellcode (main.rs, power.rs, i18n.rs, config.rs, users.rs, panel.rs)
|
||||
- `resources/` — GResource-Assets (style.css, wallpaper.jpg komprimiert, default-avatar.svg)
|
||||
- `resources/` — GResource-Assets (style.css, default-avatar.svg)
|
||||
- `config/` — Beispiel-Konfigurationsdateien
|
||||
|
||||
## Kommandos
|
||||
@@ -54,6 +54,6 @@ Kurzfassung der wichtigsten Entscheidungen:
|
||||
- **System-Icons**: Adwaita/Catppuccin liefern alle benötigten symbolischen Icons
|
||||
- **Lock ohne Confirmation**: Lock ist sofort reversibel, braucht kein Confirm
|
||||
- **Absolute Pfade für Binaries**: `/usr/bin/systemctl` etc. statt relativer Pfade (Security)
|
||||
- **GResource-Bundle**: CSS, Wallpaper (komprimiert) und Default-Avatar sind in die Binary kompiliert
|
||||
- **GResource-Bundle**: CSS und Default-Avatar sind in die Binary kompiliert (Wallpaper kommt vom Dateisystem)
|
||||
- **Async Power Actions**: `glib::spawn_future_local` + `gio::spawn_blocking` mit 30s Timeout
|
||||
- **Journal-Logging**: `systemd-journal-logger` statt File-Logging — `journalctl -t moonset`, Debug-Level per `MOONSET_DEBUG` Env-Var
|
||||
|
||||
Reference in New Issue
Block a user