diff --git a/src/main.rs b/src/main.rs index 6b0e932..31b8219 100644 --- a/src/main.rs +++ b/src/main.rs @@ -87,10 +87,6 @@ async fn upload_to_zip(mut body: Multipart) -> Result continue, }; - if !path_is_valid(&file_name) { - return Err((StatusCode::BAD_REQUEST, "Invalid Filename >:(".to_owned())); - } - tracing::debug!("Downloading to Zip: {file_name:?}"); let stream = field; @@ -121,19 +117,6 @@ async fn upload_to_zip(mut body: Multipart) -> Result bool { - let mut components = Path::new(path).components().peekable(); - - if let Some(first) = components.peek() { - if !matches!(first, std::path::Component::Normal(_)) { - return false; - } - } - - components.count() == 1 -} - #[inline] async fn make_dir(name: T) -> io::Result<()> where