diff options
author | Jonas Diemer <jonasdiemer@gmail.com> | 2022-08-04 09:20:37 +0000 |
---|---|---|
committer | Jonas Diemer <jonasdiemer@gmail.com> | 2022-09-18 18:25:35 +0000 |
commit | 550ae0151c1dadc6c1f00df300d88528c29fbf49 (patch) | |
tree | e533fdef6284f8c3f55e521f2c08f93d546d4a8c /src/file_upload.rs | |
parent | Avoid error message during testing of restricted (diff) | |
download | miniserve-550ae0151c1dadc6c1f00df300d88528c29fbf49.tar.gz miniserve-550ae0151c1dadc6c1f00df300d88528c29fbf49.zip |
Renamed option for more clarity
Diffstat (limited to 'src/file_upload.rs')
-rw-r--r-- | src/file_upload.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/file_upload.rs b/src/file_upload.rs index e5f6173..231999f 100644 --- a/src/file_upload.rs +++ b/src/file_upload.rs @@ -173,9 +173,8 @@ pub async fn upload_file( // Disallow paths outside of restricted directories - // TODO: Probably not the most rust-ic style... - let upload_allowed = conf.restrict_upload_dir.is_empty() || - conf.restrict_upload_dir.iter().any(|s| upload_path.starts_with(s)); + let upload_allowed = conf.allowed_upload_dir.is_empty() || + conf.allowed_upload_dir.iter().any(|s| upload_path.starts_with(s)); if !(upload_allowed) { return Err(ContextualError::InvalidPathError("Not allowed to upload to this path".to_string())); |