X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=perl%2FDXCommandmode.pm;h=6b62f58a820f02d1215f7b7decd1054300ad0ec0;hb=be587fd8dade028c10545ffff4be13b0a18f3f91;hp=332e3badc98919d3893b6f40cd0d54703d93eb4b;hpb=121e8d518a57f693b0c71d8c959c644f5e950911;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 332e3bad..6b62f58a 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -435,6 +435,8 @@ sub run_cmd if ($cmd) { # strip out // on command only $cmd =~ s|//|/|g; + $cmd =~ s|^/||g; # no leading / either + $cmd =~ s|[^-\w/]||g; # and no funny characters either my ($path, $fcmd); @@ -450,7 +452,7 @@ sub run_cmd # first expand out the entry to a command ($path, $fcmd) = search($main::localcmd, $cmd, "pl"); - ($path, $fcmd) = search($main::cmd, $cmd, "pl") if !$path || !$fcmd; + ($path, $fcmd) = search($main::cmd, $cmd, "pl") unless $path && $fcmd; if ($path && $cmd) { dbg("path: $cmd cmd: $fcmd") if isdbg('command'); @@ -918,7 +920,7 @@ sub wwv return unless $self->{wwv}; if ($self->{wwvfilter}) { - ($filter, $hops) = $self->{wwvfilter}->it(@_ ); + ($filter, $hops) = $self->{wwvfilter}->it(@_[7..$#_] ); return unless $filter; }