From 5b115d27f73e4f9fabd1718ced1133cbacba2775 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 04:10:06 +0000 Subject: [PATCH 1/3] Fix insecure extension check in read_sheet_file Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> --- src-tauri/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9a32958..1668980 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -938,8 +938,12 @@ fn load_extensions(app: AppHandle) -> Vec { } fn is_sheet_path(path: &str) -> bool { - let lower = path.to_lowercase(); - lower.ends_with(".numi") || lower.ends_with(".sum") + std::path::Path::new(path) + .extension() + .map_or(false, |ext| { + let ext = ext.to_string_lossy().to_lowercase(); + ext == "numi" || ext == "sum" + }) } /// A sheet handed to us by the OS (file association, second launch): same From f65806403a65a8b1a9f60907fb0a3738aabed4bd Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 04:12:49 +0000 Subject: [PATCH 2/3] Fix insecure extension check in read_sheet_file and run cargo fmt Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> --- src-tauri/src/main.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 1668980..a764ba8 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -938,12 +938,10 @@ fn load_extensions(app: AppHandle) -> Vec { } fn is_sheet_path(path: &str) -> bool { - std::path::Path::new(path) - .extension() - .map_or(false, |ext| { - let ext = ext.to_string_lossy().to_lowercase(); - ext == "numi" || ext == "sum" - }) + std::path::Path::new(path).extension().map_or(false, |ext| { + let ext = ext.to_string_lossy().to_lowercase(); + ext == "numi" || ext == "sum" + }) } /// A sheet handed to us by the OS (file association, second launch): same From d812f65cfddc1ceb474f64851f660e2b3bd66acf Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 04:22:48 +0000 Subject: [PATCH 3/3] Fix clippy unnecessary_map_or warning Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> --- src-tauri/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index a764ba8..d7941d1 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -938,7 +938,7 @@ fn load_extensions(app: AppHandle) -> Vec { } fn is_sheet_path(path: &str) -> bool { - std::path::Path::new(path).extension().map_or(false, |ext| { + std::path::Path::new(path).extension().is_some_and(|ext| { let ext = ext.to_string_lossy().to_lowercase(); ext == "numi" || ext == "sum" })