diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2024-01-26 05:13:21 +0000 |
---|---|---|
committer | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2024-01-26 05:13:21 +0000 |
commit | 2fe13fbddb403469dc3260b2ff6c84ec5fc153c7 (patch) | |
tree | e1afb1141376b58839e03f3b45bad8e672c0d7b3 /src/config.rs | |
parent | Bump deps (diff) | |
download | miniserve-2fe13fbddb403469dc3260b2ff6c84ec5fc153c7.tar.gz miniserve-2fe13fbddb403469dc3260b2ff6c84ec5fc153c7.zip |
Fix inaccurate uses of `sanitize_path`
Diffstat (limited to '')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index 6e4a1eb..43414b2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -266,9 +266,9 @@ impl MiniserveConfig { .map(|v| { v.iter() .map(|p| { - sanitize_path(p, false) + sanitize_path(p, args.hidden) .map(|p| p.display().to_string().replace('\\', "/")) - .ok_or(anyhow!("Illegal path {p:?}: upward traversal not allowed")) + .ok_or(anyhow!("Illegal path {p:?}")) }) .collect() }) |