From 0d106bdd90138c810bdf7a87616d88cbdf504cdd Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 20 Jun 2024 13:11:40 -0700 Subject: [PATCH] Safe URI for reflection --- src-tauri/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 381b3e95..3a2931e8 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -135,12 +135,14 @@ async fn cmd_grpc_reflect( .await .map_err(|e| e.to_string())?; + let uri = safe_uri(&req.url); + grpc_handle .lock() .await .services( &req.id, - &req.url, + &uri, &proto_files .iter() .map(|p| PathBuf::from_str(p).unwrap())