version 1.55, 2004/05/26 22:25:38
|
version 1.56, 2004/05/26 22:31:30
|
Line 164 sub URLToPath {
|
Line 164 sub URLToPath {
|
sub url { |
sub url { |
my $fn=shift; |
my $fn=shift; |
$fn=~s/^\/home\/(\w+)\/public\_html/\/priv\/$1/; |
$fn=~s/^\/home\/(\w+)\/public\_html/\/priv\/$1/; |
|
$fn=&HTML::Entities::encode($fn,'<>"&'); |
return $fn; |
return $fn; |
} |
} |
|
|
Line 290 sub checksuffix {
|
Line 291 sub checksuffix {
|
sub cleanDest { |
sub cleanDest { |
my ($request,$dest)=@_; |
my ($request,$dest)=@_; |
#remove bad characters |
#remove bad characters |
if ($dest=~/[\#\?&]/) { |
if ($dest=~/[\#\?&%]/) { |
$request->print("<p><font color=\"red\">".&mt('Invalid characters in requested name have been removed.')."</font></p>"); |
$request->print("<p><font color=\"red\">".&mt('Invalid characters in requested name have been removed.')."</font></p>"); |
$dest=~s/[\#\?&]//g; |
$dest=~s/[\#\?&%]//g; |
} |
} |
return $dest; |
return $dest; |
} |
} |
Line 1116 sub phasetwo {
|
Line 1117 sub phasetwo {
|
if(!&Rename2($r, $uname, $dir, $fn, $ENV{'form.newfilename'})) { |
if(!&Rename2($r, $uname, $dir, $fn, $ENV{'form.newfilename'})) { |
return; |
return; |
} |
} |
$dest = &url($ENV{'form.newfilename'}); |
$dest = $ENV{'form.newfilename'}; |
} |
} |
} elsif ($ENV{'form.action'} eq 'delete') { |
} elsif ($ENV{'form.action'} eq 'delete') { |
if(!&Delete2($r, $uname, $ENV{'form.newfilename'})) { |
if(!&Delete2($r, $uname, $ENV{'form.newfilename'})) { |