diff options
author | Tar Committer <tar@ocjtech.us> | 2002-05-02 23:08:06 +0000 |
---|---|---|
committer | Tar Committer <tar@ocjtech.us> | 2002-05-02 23:08:06 +0000 |
commit | afcac75e572bcdd3cf269b921b7e8324aa5ffd4c (patch) | |
tree | dfffbfceb4f15c22781a599d6352586c8b7ce582 /util | |
parent | 9f2402b0d86333f5f7e9d50437036cd3124bde47 (diff) | |
download | rancid-2.2.1.tar.gz rancid-2.2.1.tar.xz rancid-2.2.1.zip |
Imported from rancid-2.2.1.tar.gz.rancid-2.2.1
Diffstat (limited to 'util')
-rwxr-xr-x | util/lg/lg.cgi.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/lg/lg.cgi.in b/util/lg/lg.cgi.in index 714c6cc..fe07c58 100755 --- a/util/lg/lg.cgi.in +++ b/util/lg/lg.cgi.in @@ -276,6 +276,7 @@ $router_param = ($query->param('router'))[0]; $remote_user = $ENV{REMOTE_USER}; $arg = ($query->param('args'))[0]; # handle multiple args +$arg =~ s/["'`]//g; # these are BS in any arg for any query @arg = split(' ', $arg); # verify commands, arguments, etc. @@ -342,7 +343,7 @@ if (!defined($type) || !defined($router)) { mneighbor => "show bgp neighbor", neighbor => "show bgp neighbor", regex => "show route table inet.0 aspath-regex", - route => "show route forwarding-table destination", + route => "show route table inet.0 terse", routemap => "show policy", ping => "ping rapid count 5", prefix => "show route table inet.0", @@ -457,7 +458,7 @@ if ($type eq "prefix" || $type eq "mbgp" || $type eq "route" ) { } } elsif ($type eq "ping" || $type eq "trace") { if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) { - if ($arg[0] !~ /([A-Za-z0-9-]*.)*[A-Za-z0-9-]*.(com|edu|net|org)/) { + if ($arg[0] !~ /^[A-Za-z0-9._-]+$/) { $results[0] = "That argument ($arg[0]) is not valid.\n"; &print_results($mfg); } |