From 5bcfa4ac832a9457ed32ff377febf6e284c5e1d5 Mon Sep 17 00:00:00 2001 From: Sheepy Date: Sat, 25 Jun 2022 19:02:02 -0500 Subject: Create directory (#781) * Add ability to make directory Frontend for making directories Fix potential security vulnerability (CWE-23) Add tests Update README.md Disallow using parent directories altogether Fix formatting Fix clippy warnings Address review comments Update README.md Change `making` to `creation` Co-authored-by: Sven-Hendrik Haase Have make directory flag require file upload flag Address review comments * Disallow uploading files and making directories through symlinks when disabled * Add test * Clippy formatting changes * Add test doc comment --- src/args.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/args.rs') diff --git a/src/args.rs b/src/args.rs index f02efa1..687649d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -111,6 +111,10 @@ pub struct CliArgs { #[clap(short = 'u', long = "upload-files")] pub file_upload: bool, + /// Enable creating directories + #[clap(short = 'U', long = "mkdir", requires = "file-upload")] + pub mkdir_enabled: bool, + /// Specify uploadable media types #[clap(arg_enum, short = 'm', long = "media-type", requires = "file-upload")] pub media_type: Option>, -- cgit v1.2.3