From 470265aa5dcc6690b1a09a1ffa51f9f12cc06b43 Mon Sep 17 00:00:00 2001 From: Yt Date: Mon, 19 Jun 2023 09:26:45 -0400 Subject: [PATCH 1/2] storage: fix secret read path (#138) --- src/storages/models/available_stores.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storages/models/available_stores.rs b/src/storages/models/available_stores.rs index b33d6ef..6dd9ea0 100644 --- a/src/storages/models/available_stores.rs +++ b/src/storages/models/available_stores.rs @@ -73,8 +73,8 @@ fn from_string_or_path(variable: &Option, path: &Option) -> Str if let Some(variable) = variable { variable.to_string() } else if let Some(path) = path { - let file = File::open("path_to_your_file") - .unwrap_or_else(|_| panic!("failed to open path {}", path.display())); + let file = + File::open(path).unwrap_or_else(|_| panic!("failed to open path {}", path.display())); let mut contents = String::new(); BufReader::new(file) .read_to_string(&mut contents) From d231b0c064cc4d7158fa681ac742d2b834d632df Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Mon, 19 Jun 2023 17:28:47 +0400 Subject: [PATCH 2/2] Version bumped to 0.7.4. Signed-off-by: Pavel Kirilin --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cd70b6f..4b2c601 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3164,7 +3164,7 @@ dependencies = [ [[package]] name = "rustus" -version = "0.7.3" +version = "0.7.4" dependencies = [ "actix-cors", "actix-files", diff --git a/Cargo.toml b/Cargo.toml index 66546b0..7f81438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustus" -version = "0.7.3" +version = "0.7.4" edition = "2021" description = "TUS protocol implementation written in Rust." keywords = ["tus", "server", "actix-web"]