Fix security issues, clean Rust warnings, restore UTF-8 locales, and improve account UX/performance#3179
Open
Vucius wants to merge 8 commits into
Open
Fix security issues, clean Rust warnings, restore UTF-8 locales, and improve account UX/performance#3179Vucius wants to merge 8 commits into
Vucius wants to merge 8 commits into
Conversation
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.
Overview
This PR focuses on eliminating compiler warnings, improving backend security, fixing locale encoding/formatting issues, and optimizing frontend performance and user experience (UX) during account operations.
Key Changes
1. Security & Backend Fixes
validate_user_json_pathinsrc-tauri/src/commands/mod.rsand integrated it into log export commands (export_proxy_logsandexport_proxy_logs_jsoninproxy.rs) to validate target file paths before writing files.src-tauri/src/modules/account.rs.src-tauri/src/lib.rsto suggest viewinggui_config.jsonor environment variables instead of searching Docker logs.2. Rust Warning Cleanups
Addressed numerous compiler warnings to improve code health and build output readability:
cloudflared.rs,config.rs,user_token_db.rs,retry.rs) and tagged unused helper functions with#[allow(dead_code)](e.g., insecurity_db.rs,scheduler.rs,version.rs,crypto.rs,http.rs)._sid,_rx,_tx,_result,_entry,_timeout_secs) across mapping and token management modules.#![cfg(target_os = "windows")]insrc-tauri/src/utils/command.rsand localized process dependencies insrc-tauri/src/modules/integration.rs.3. Frontend & UX Optimizations
switchAccountinsrc/stores/useAccountStore.tsto retrieve the current account and all accounts in parallel (Promise.all), reducing load times.vite.config.tsto clean up compilation build warnings.4. Locales & Encoding Fixes
src/locales/(includingzh.json,zh-TW.json,en.json, and others) to fix TypeScript compilation string literal syntax errors (TS1002).