From 46c64a983927aaa7e7a752bc0643e8c9c43e23ec Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Wed, 18 May 2022 06:45:37 +0200 Subject: 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. --- src/args.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/args.rs') 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, - /// Show symlink info + /// Visualize symlinks in directory listing #[clap(short = 'l', long = "show-symlink-info")] pub show_symlink_info: bool, -- cgit v1.2.3