X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FConfig.pm;h=6f869e8efb317b526a456da38f70862ca47d4fa8;hb=2edd4cc1153f0ad50f86d9c56d2e27b29554c985;hp=5fbb524e6f9a4c2f1546422089a7a7e2befc3d6e;hpb=b2ca39703efb4a553c0c9d51b7a5ddf93d90be72;p=debbugs.git diff --git a/Debbugs/Config.pm b/Debbugs/Config.pm index 5fbb524..6f869e8 100644 --- a/Debbugs/Config.pm +++ b/Debbugs/Config.pm @@ -76,6 +76,13 @@ use Safe; # read in the files; %config = (); +# untaint $ENV{DEBBUGS_CONFIG_FILE} if it's owned by us +# This enables us to test things that are -T. +if (exists $ENV{DEBBUGS_CONFIG_FILE} and + ${[stat($ENV{DEBBUGS_CONFIG_FILE})]}[4] = $<) { + $ENV{DEBBUGS_CONFIG_FILE} =~ /(.+)/; + $ENV{DEBBUGS_CONFIG_FILE} = $1; +} read_config(exists $ENV{DEBBUGS_CONFIG_FILE}?$ENV{DEBBUGS_CONFIG_FILE}:'/etc/debbugs/config'); =item email_domain $gEmailDomain