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/errors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index 5f55514..22351a3 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -30,7 +30,7 @@ pub enum ContextualError { #[error("Invalid format for credentials string. Expected username:password, username:sha256:hash or username:sha512:hash")] InvalidAuthFormat, - /// Might occure if the hash method is neither sha256 nor sha512 + /// Might occur if the hash method is neither sha256 nor sha512 #[error("{0} is not a valid hashing method. Expected sha256 or sha512")] InvalidHashMethod(String), @@ -42,7 +42,7 @@ pub enum ContextualError { #[error("HTTP password length exceeds 255 characters")] PasswordTooLongError, - /// Might occur if the user has unsufficient permissions to create an entry in a given directory + /// Might occur if the user has insufficient permissions to create an entry in a given directory #[error("Insufficient permissions to create file in {0}")] InsufficientPermissionsError(String), @@ -51,7 +51,7 @@ pub enum ContextualError { ParseError(String, String), /// Might occur when the creation of an archive fails - #[error("An error occured while creating the {0}\ncaused by: {1}")] + #[error("An error occurred while creating the {0}\ncaused by: {1}")] ArchiveCreationError(String, Box), /// More specific archive creation failure reason -- cgit v1.2.3