Assume it is generally unwise, and add comments when used explaining
why it is supposed to be OK.
if (!defined($gpghome)) {
if (exists $ENV{GNUPGHOME} and $ENV{GNUPGHOME} ne '') {
+
+ # We might be running in taint mode, but we assume that is about
+ # data coming from the network, and that the local environment
+ # is generally trustworthy.
+
$gpghome = untaint($ENV{GNUPGHOME});
} else {
my $userhome=File::HomeDir->my_home;
# use sparingly! We want to keep taint mode around for the data we
-# get over the network. this is only here because we want to treat
-# the command line arguments differently for the subprocess.
+# get over the network.
sub untaint {
my $x = shift;
$x =~ /^(.*)$/ ;