Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

automation: deny edit.installedProfiles, it scans the OS profile folders (#3763)

Sir Starchd9ecd60fb3f0
diff --git a/crates/automation/src/workspace.rs b/crates/automation/src/workspace.rs
index d8e82503e..d95c95632 100644
--- a/crates/automation/src/workspace.rs
+++ b/crates/automation/src/workspace.rs
@@ -307,7 +307,8 @@ fn params_contain_ambient_path(id: &str, params: &Value) -> bool {
}
fn profile_command_may_read_ambient(id: &str, params: &Value) -> bool {
- if matches!(id, "color.profileMismatch" | "edit.colorSettings" | "view.proofSetup") {
+ // Installed profiles scan OS and user directories even without a request path.
+ if matches!(id, "color.profileMismatch" | "edit.colorSettings" | "edit.installedProfiles" | "view.proofSetup") {
return true;
}
matches!(id, "edit.assignProfile" | "edit.convertToProfile" | "edit.profileInfo")