X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=f5ef8e2808ba0a1b403610ed5245575013b93960;hb=526e7127d7eb6d8e2f2a4cffd782c4c87f0d1742;hp=4dbeb863c8ba784f8ee3b264eb4e507cfc4d0e5f;hpb=3196486ff0a78459e1b88b3847d255a62fd17895;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 4dbeb863..f5ef8e28 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -439,7 +439,9 @@ sub run_cmd if ($cmd) { # strip out // and .. on command only $cmd =~ s|//|/|g; - $cmd =~ s|\.+|\.|g; + $cmd =~ s|\.+||g; # no dots allowed + $cmd =~ s|^/||g; # no leading / either + $cmd =~ s|[^-\w/]||g; # and no funny characters my ($path, $fcmd);