From 2edd4cc1153f0ad50f86d9c56d2e27b29554c985 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 17 Feb 2007 13:21:12 -0800 Subject: [PATCH 1/1] untaint $ENV{DEBBUGS_CONFIG_FILE} when appropriate --- Debbugs/Config.pm | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.2