From be298a203e5044131b71d108260859ce69ba4ee5 Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Sun, 26 Dec 2010 14:47:46 +0000 Subject: [PATCH 1/1] Catch error of trying to download a non-readable file using URL manipulation --- modules/Command.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Command.pm b/modules/Command.pm index 431eb4d..5d0e653 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2010-05-24 +# Last modified: 2010-10-26 # # Copyright (C) 1999-2000 Roland Bluethgen, Frank Schoenmann # Copyright (C) 2003-2009 Patrick Canterino @@ -461,7 +461,7 @@ sub exec_download($$) my $virtual = $data->{'virtual'}; my $dir = upper_path($virtual); - return return error($config->{'errors'}->{'no_download'},$dir,{FILE => $virtual}) if(-d $physical || -l $physical); + return return error($config->{'errors'}->{'no_download'},$dir,{FILE => $virtual}) if((not -r $physical) || (-d $physical || -l $physical)); my $filename = file_name($virtual); -- 2.34.1