From 2ad9ec6883d81c3389d4ce307ad2d36b48aa0e5a Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Fri, 22 Apr 2005 17:09:51 +0000 Subject: [PATCH 1/1] Some small changes --- devedit.pl | 4 ++-- modules/Command.pm | 3 +-- modules/Output.pm | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/devedit.pl b/devedit.pl index 76dd3c4..3fd8641 100644 --- a/devedit.pl +++ b/devedit.pl @@ -6,7 +6,7 @@ # Dev-Editor's main program # # Author: Patrick Canterino -# Last modified: 2005-04-16 +# Last modified: 2005-04-22 # use strict; @@ -87,7 +87,7 @@ if($newfile ne '' && $newfile !~ /^\s+$/) unless(-r $new_physical && -w $new_physical && -x $new_physical) { - abort($config->{'errors'}->{'dir_no_create'},'/',{DIR => $new_virtual}); + abort($config->{'errors'}->{'dir_no_create'},'/',{DIR => encode_html($new_virtual)}); } # Create the physical and the virtual path diff --git a/modules/Command.pm b/modules/Command.pm index 2e0933b..bbad3f1 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -281,7 +281,6 @@ sub exec_beginedit($$) my $physical = $data->{'physical'}; my $virtual = $data->{'virtual'}; my $dir = upper_path($virtual); - my $cgi = $data->{'cgi'}; return error($config->{'errors'}->{'link_edit'},$dir) if(-l $physical); return error($config->{'errors'}->{'dir_edit'}, $dir) if(-d $physical); @@ -618,7 +617,7 @@ sub exec_copy($$) } } - copy($physical,$new_physical) or return error($config->{'errors'}->{'copy_failed'},$dir,{FILE => $virtual, NEW_FILE => $new_virtual}); + copy($physical,$new_physical) or return error($config->{'errors'}->{'copy_failed'},$dir,{FILE => encode_html($virtual), NEW_FILE => $new_virtual->{'html'}}); return devedit_reload({command => 'show', file => $new_dir}); } else diff --git a/modules/Output.pm b/modules/Output.pm index 9ef361c..cd4e53e 100644 --- a/modules/Output.pm +++ b/modules/Output.pm @@ -60,7 +60,7 @@ sub error($;$$) $tpl->read_file($tpl_error); $tpl->fillin('ERROR',$message); - $tpl->fillin('BACK',$path); + $tpl->fillin('BACK',encode_html($path)); $tpl->fillin('BACK_URL',escape($path)); $tpl->fillin('SCRIPT',encode_html($ENV{'SCRIPT_NAME'})); -- 2.34.1