Commit 63792e12 authored by Leigh Stoller's avatar Leigh Stoller

Add taint checking of args since we are going to export this to ops

for a while.
parent 8b11f910
#!/usr/bin/perl -w
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
......@@ -104,6 +104,22 @@ if (@ARGV != 2) {
my ($pid,$eid) = @ARGV;
my $state;
#
# Untaint the arguments.
#
if ($pid =~ /^([-\w\.]+)$/) {
$pid = $1;
}
else {
die("Tainted argument $pid!\n");
}
if ($eid =~ /^([-\w\.]+)$/) {
$eid = $1;
}
else {
die("Tainted argument $eid!\n");
}
#
# Experiment must exist.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment