From: pcanterino <> Date: Sun, 26 Dec 2010 14:47:46 +0000 (+0000) Subject: Catch error of trying to download a non-readable file using URL manipulation X-Git-Tag: version_3_2~18 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/be298a203e5044131b71d108260859ce69ba4ee5 Catch error of trying to download a non-readable file using URL manipulation --- 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);