diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2022-05-18 04:45:37 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2022-05-18 04:45:37 +0000 |
commit | 46c64a983927aaa7e7a752bc0643e8c9c43e23ec (patch) | |
tree | 02519193e2ab5e52ef24fbb530e08c188b502b66 /src/args.rs | |
parent | Run clippy only on nightly (diff) | |
download | miniserve-46c64a983927aaa7e7a752bc0643e8c9c43e23ec.tar.gz miniserve-46c64a983927aaa7e7a752bc0643e8c9c43e23ec.zip |
Fix security issue with --no-symlinks
Even with --no-symlinks specified, if a direct path to a symlink had been entered, it would be resolved.
This fixes that behavior and improves tests to ensure this behavior.
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/args.rs b/src/args.rs index 7667bee..757fd22 100644 --- a/src/args.rs +++ b/src/args.rs @@ -75,7 +75,7 @@ pub struct CliArgs { #[clap(long = "random-route", conflicts_with("route-prefix"))] pub random_route: bool, - /// Do not follow symbolic links + /// Hide symlinks in listing and prevent them from being followed #[clap(short = 'P', long = "no-symlinks")] pub no_symlinks: bool, @@ -160,7 +160,7 @@ pub struct CliArgs { )] pub header: Vec<HeaderMap>, - /// Show symlink info + /// Visualize symlinks in directory listing #[clap(short = 'l', long = "show-symlink-info")] pub show_symlink_info: bool, |