|
Lines 27-32
Link Here
|
| 27 |
|
27 |
|
| 28 |
$command = $ARGV[0]; |
28 |
$command = $ARGV[0]; |
| 29 |
|
29 |
|
|
|
30 |
# XXX thomas: white list filter for arguments |
| 31 |
for($i = 0; $i < scalar(@ARGV); $i++) |
| 32 |
{ |
| 33 |
$str = $ARGV[$i]; |
| 34 |
|
| 35 |
$str =~ s/\w//g; |
| 36 |
if(length($str) > 0) |
| 37 |
{ |
| 38 |
# includes non-valid characters |
| 39 |
exit 1; |
| 40 |
} |
| 41 |
# i-th argument includes valid characters only |
| 42 |
} |
| 43 |
|
| 30 |
if($command eq "list") { |
44 |
if($command eq "list") { |
| 31 |
list($ARGV[1]); |
45 |
list($ARGV[1]); |
| 32 |
} elsif($command eq "copyout") { |
46 |
} elsif($command eq "copyout") { |