From: pcanterino <> Date: Sat, 13 Nov 2004 09:13:02 +0000 (+0000) Subject: The path the user wants to access must now BEGIN with the root directory. The X-Git-Tag: version_2_2~8 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/2c1ae8ce0d1d7a090d02166c31e8b87b4806d1ff?hp=73f2498331782691215bb4cc02fc4431145b7027 The path the user wants to access must now BEGIN with the root directory. The old check made it possible to access a directory structure outside the root directory similar to the root directory. --- diff --git a/modules/Tool.pm b/modules/Tool.pm index 2d044e0..c3548b0 100644 --- a/modules/Tool.pm +++ b/modules/Tool.pm @@ -69,7 +69,7 @@ sub check_path($$) # Check if the path is above the root directory - return if(index($path,$root) == -1); + return if(index($path,$root) != 0); return if($first eq $root && $last =~ m!^(/|\\)?\.\.(/|\\)?$!); # Create short path name