Listing 6 - /cgi-bin/aliases

#!/usr/local/bin/taintperl

$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
# Only capture variables of the form matching:
#    Begining of line
#    Zero or more alphanumeric[0-9a-zA-Z_ ] or '.' periods
#    End of line
$ARGV[0] =~ /^([\w.@ ]*)$/;
$first = $1;
system '/opt/sysadmin/unsecure_aliases', $first;

